Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix/thread-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
turuslan committed Oct 2, 2023
2 parents 98bc6da + 069f49f commit 7124fca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
8 changes: 0 additions & 8 deletions test/core/consensus/babe/babe_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,6 @@ TEST_F(BabeTest, Success) {
// we are not leader of the first slot, but leader of the second
EXPECT_CALL(*block_tree_, bestBlock()).WillRepeatedly(Return(best_leaf));

// call for check condition of offchain worker run
EXPECT_CALL(*block_tree_, getLastFinalized())
.WillRepeatedly(Return(best_leaf));
EXPECT_CALL(*block_tree_, getBestContaining(_))
.WillOnce(Return(best_leaf))
.WillOnce(
Return(BlockInfo(created_block_.header.number, created_block_hash_)));

EXPECT_CALL(*block_tree_, getBlockHeader(best_block_hash_))
.WillRepeatedly(Return(outcome::success(best_block_header_)));
EXPECT_CALL(*block_tree_, getBlockHeader(created_block_hash_))
Expand Down
12 changes: 5 additions & 7 deletions test/core/consensus/babe/block_executor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) {
EXPECT_CALL(*block_tree_, getBlockHeader("parent_hash"_hash256))
.WillRepeatedly(testing::Return(kagome::primitives::BlockHeader{
.parent_hash = "grandparent_hash"_hash256, .number = 40}));
EXPECT_CALL(*block_tree_, getLastFinalized())
.WillOnce(testing::Return(BlockInfo{40, "grandparent_hash"_hash256}))
EXPECT_CALL(*block_tree_, bestBlock())
// previous best
.WillOnce(testing::Return(BlockInfo{41, "parent_hash"_hash256}))
// current best
.WillOnce(testing::Return(BlockInfo{42, "some_hash"_hash256}));
EXPECT_CALL(*block_tree_, getBestContaining("grandparent_hash"_hash256))
.WillOnce(testing::Return(BlockInfo{41, "parent_hash"_hash256}));
EXPECT_CALL(*core_, execute_block_ref(_, _))
.WillOnce(testing::Return(outcome::success()));
EXPECT_CALL(*block_tree_, addBlock(_))
Expand All @@ -256,8 +256,6 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) {
onDigest(BlockContext{.block_info = {42, "some_hash"_hash256}}, _))
.WillOnce(testing::Return(outcome::success()));
}
EXPECT_CALL(*block_tree_, getBestContaining("some_hash"_hash256))
.WillOnce(testing::Return(BlockInfo{42, "some_hash"_hash256}));
EXPECT_CALL(*offchain_worker_api_, offchain_worker(_, _))
.WillOnce(testing::Return(outcome::success()));

Expand All @@ -271,7 +269,7 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) {
block_executor_->applyBlock(
Block{block_data.header.value(), block_data.body.value()},
justification,
[](auto &&result) { EXPECT_OUTCOME_TRUE_1(result); });
[](auto &&result) { ASSERT_OUTCOME_SUCCESS_TRY(result); });

testutil::wait(*thread_pool_.io_context());
}
2 changes: 1 addition & 1 deletion zombienet/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GitPython==3.1.32
GitPython==3.1.35

0 comments on commit 7124fca

Please sign in to comment.