Skip to content

Commit 6ae62d8

Browse files
committed
GH-1062 Update test to use create_signed_block
1 parent d00a4f7 commit 6ae62d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/block_log.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct block_log_fixture {
3636
}
3737
else {
3838
eosio::chain::genesis_state gs;
39-
log->reset(gs, std::make_shared<eosio::chain::signed_block>());
39+
log->reset(gs, eosio::chain::signed_block::create_signed_block(eosio::chain::signed_block::create_mutable_block({})));
4040

4141
//in this case it's not really empty since the "genesis block" is present. These tests only
4242
// work because the default ctor of a block_header (used above) has previous 0'ed out which
@@ -54,11 +54,12 @@ struct block_log_fixture {
5454
std::vector<char> a;
5555
a.assign(size, fillchar);
5656

57-
auto p = std::make_shared<eosio::chain::signed_block>();
57+
auto p = eosio::chain::signed_block::create_mutable_block({});
5858
p->previous._hash[0] = fc::endian_reverse_u32(index-1);
5959
p->header_extensions.push_back(std::make_pair<uint16_t, std::vector<char>>(0, std::vector<char>(a)));
6060

61-
log->append(p, p->calculate_id(), fc::raw::pack(*p));
61+
auto sp = eosio::chain::signed_block::create_signed_block(std::move(p));
62+
log->append(sp, sp->calculate_id(), sp->packed_signed_block());
6263

6364
if(index + 1 > written_data.size())
6465
written_data.resize(index + 1);

0 commit comments

Comments
 (0)