Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Merge prune-cfd-stage-1 branch #9061

Merged
merged 158 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
2401a98
Added block log v4
huangminghuang Mar 27, 2020
a2ac67c
Rename of pruned_transaction, pruned_block to packed_transaction, sig…
heifner Mar 31, 2020
4c5283d
Merge remote-tracking branch 'origin/develop' into move-to-pruned-blo…
heifner Mar 31, 2020
a6f3a6e
Removed get_raw_transaction as not used
heifner Mar 31, 2020
0f6fdb6
Add packed_transaction & packed_transaction_v0 support to abi_serializer
heifner Mar 31, 2020
c0934af
Add new signed_block as signed_block_v0 support to abi_serializer
heifner Mar 31, 2020
c418e11
Changes for review comments and adding prune_transaction()
huangminghuang Mar 31, 2020
855d83b
Fix serialization of transaction_receipt_v0 and signed_block to signe…
heifner Mar 31, 2020
eba4d9b
Support receiving old/new packed_transaction & signed_block
heifner Apr 1, 2020
739692f
Some more changes on PR comments
huangminghuang Apr 1, 2020
9a429fd
Remove unneeded calls to block id()
heifner Apr 1, 2020
f0247c2
Add protocol version pruned_types
heifner Apr 1, 2020
5433998
Remove head_id()
heifner Apr 1, 2020
b75d09c
Rename block id() to calculate_id() to make it obvious it is not retu…
heifner Apr 1, 2020
01e3b22
refactor repair_log with mmap()
huangminghuang Apr 2, 2020
2a125a5
Use boost mapped_file_source
huangminghuang Apr 2, 2020
eeb89fa
Update comments
heifner Apr 2, 2020
43eba6b
Add estimated size to packed_transaction to more closely track size o…
heifner Apr 2, 2020
f83d51a
Use packed_transaction_v0::compression_type where appropriate
heifner Apr 2, 2020
c1a61c4
Updated comments. Going to work new net_version in diff PR.
heifner Apr 2, 2020
eef41b4
Added support for add of signed_block. Removed support for extract of…
heifner Apr 3, 2020
1e7705d
Add test for trim_blocklog_end
huangminghuang Apr 3, 2020
50dc7e0
Prevent implicit copy of transaction/signed_transaction. fix some unn…
heifner Apr 3, 2020
ebf6e3f
Made copy constructor explicit
heifner Apr 3, 2020
d5d4dba
Get block id appropriately
heifner Apr 3, 2020
718e222
refactor test cases and add prune_transaction test
huangminghuang Apr 3, 2020
62d61d3
Revert "Support receiving old/new packed_transaction & signed_block"
heifner Apr 3, 2020
8e35ae5
Revert make_unique, going to work on that some other time.
heifner Apr 3, 2020
175bae2
Make signed_block_v0_ptr shared_prt to const
heifner Apr 3, 2020
2acbf7c
Remove extract for packed_transaction
heifner Apr 3, 2020
6bf7606
Revert net_plugin changes for now.
heifner Apr 3, 2020
a933a22
For now just convert to/from packed_transaction/packed_transaction_v0…
heifner Apr 3, 2020
7653f7e
refactor smoke_test
huangminghuang Apr 3, 2020
ddfd7a5
Add move conversion constructor to pruned_block
huangminghuang Apr 3, 2020
3272c0c
Multiply prunable_size by 2 since it is also stored in unpacked trans…
heifner Apr 3, 2020
5dff59a
Add missing moves
heifner Apr 3, 2020
11f510e
use move constructor
huangminghuang Apr 3, 2020
1ec37a5
Add get_estimated_size to transaction_metadata
heifner Apr 3, 2020
43dba92
Updated add of packed_transaction to always work, just put in empty s…
heifner Apr 5, 2020
2d8860e
Add move constructor for v0 types
heifner Apr 5, 2020
a345c64
add trim_blocklog_front test
huangminghuang Apr 5, 2020
6361dd9
- Pulled in constructor fixes from #8891. Updated with peer review co…
heifner Apr 6, 2020
5296017
Remove duplicate friend. Fix compile issue.
heifner Apr 6, 2020
24a579d
Fix some more PR comments
huangminghuang Apr 6, 2020
ab70ea3
Added two new categories of execptions: subjective_block_production_e…
heifner Apr 6, 2020
6e71c85
Change prune_transaction API
huangminghuang Apr 6, 2020
e2dd59d
Combine packed_transaction constructors that take signed_transaction
heifner Apr 6, 2020
b80a5e4
revert repair_log changes
huangminghuang Apr 6, 2020
c86853a
Reworked how get_estimated_size is calculated
heifner Apr 6, 2020
15e111d
Revert change of adding packed_context_free_data
heifner Apr 6, 2020
03d36a4
Store const packed_transaction& instead of shared_ptr in transaction_…
heifner Apr 6, 2020
adeb5e1
Make transaction_metadata get_estimated_size more accurate
heifner Apr 7, 2020
6ab191e
remove unused code
huangminghuang Apr 7, 2020
0d73950
Merge branch 'develop' into block-log-v4
huangminghuang Apr 7, 2020
d0ce439
Construct variant manually to avoid to_packed_transaction_v0() call
heifner Apr 7, 2020
30d3b37
Renames and better descriptions
heifner Apr 7, 2020
4bd8fd9
Move get_packed_transaction and get_packed_transaction_size ipmlement…
heifner Apr 7, 2020
7ccfaf9
Add partial support to apply_context::get_context_free_data
heifner Apr 8, 2020
c9522cd
avoid restart_chain unit tests running concurrently
huangminghuang Apr 8, 2020
c1be4bf
Avoid uneeded copy of transaction data
heifner Apr 8, 2020
a38602b
Use shared_ptr aliasing constructor to avoid copy of packed_transaction
heifner Apr 8, 2020
e071078
Merge remote-tracking branch 'origin/develop' into move-to-pruned-blo…
heifner Apr 8, 2020
8d66d20
avoid trim block data in place
huangminghuang Apr 7, 2020
9504e39
remove temp directory after test
huangminghuang Apr 9, 2020
5dbe2fb
revert cmake changes to avoid restart_chain unit tests running concur…
huangminghuang Apr 9, 2020
1a34082
Only log what is compared for invalid receipts
heifner Apr 9, 2020
2ead8bb
Maintain compression when converting to packed_transaction_v0
heifner Apr 9, 2020
9bdedf6
refactor log_entry
huangminghuang Apr 9, 2020
644aa69
Minor cleanup
heifner Apr 9, 2020
cb53817
Use signed_block_v0 as the portable format of export_reversible_block…
heifner Apr 10, 2020
b8fd974
Fixed the wrong offset size for block log entry encoding
huangminghuang Apr 10, 2020
13267dc
Remove necessary bad block loggging
huangminghuang Apr 10, 2020
f39322e
Temporarily disable replay test since block_log changes are happening…
heifner Apr 10, 2020
03dd9ea
Add block log entry offset validation
huangminghuang Apr 10, 2020
2cf280e
Temporarily disable replay test since block_log changes are happening…
heifner Apr 10, 2020
9d5dbe6
Merge pull request #8900 from EOSIO/move-to-pruned-block-dev
heifner Apr 10, 2020
69fec33
Merge remote-tracking branch 'origin/block-log-v4' into merge-block-l…
heifner Apr 11, 2020
6022761
fix issue to repair block log with pruned blocks
huangminghuang Apr 12, 2020
e7686b3
Fix a merge problem
huangminghuang Apr 13, 2020
48cdf96
remove unnecessary assertion
huangminghuang Apr 13, 2020
1e0229d
add a static assert
huangminghuang Apr 13, 2020
3cc92d8
Fix PR comment
huangminghuang Apr 13, 2020
49c6fe9
Change prune_transactions to return number of transactions been pruned.
huangminghuang Apr 13, 2020
467a650
Remove unused method
heifner Apr 14, 2020
b114f69
Some more PR comments fix
huangminghuang Apr 14, 2020
8f96b7a
Change enum name to lowercase
huangminghuang Apr 14, 2020
a1aaeb0
Update resume from state test for new version of state file
heifner Apr 14, 2020
951ab1f
Merge pull request #8891 from EOSIO/block-log-v4
huangminghuang Apr 14, 2020
cc1d4d2
Merge remote-tracking branch 'origin/develop' into merge-dev
heifner Apr 14, 2020
4a5aa75
Merge pull request #8939 from EOSIO/merge-dev
heifner Apr 14, 2020
c3a9afd
Merge branch 'ship-library' into merge-ship-library
heifner Apr 15, 2020
1f95e33
gcc does not like members with same name as type
heifner Apr 15, 2020
8c11fb1
Add ignore of estimated_size for reflection validation script
heifner Apr 15, 2020
b76c863
Add an ignore for context_free_segments. The ignore is needed but thi…
heifner Apr 15, 2020
d512beb
Merge pull request #8955 from EOSIO/merge-ship-library
heifner Apr 15, 2020
32a0f58
Fixed reflection issue with prunable_data_type::full_legacy context_f…
heifner Apr 16, 2020
09a6adb
Fix formating changed by refactor
heifner Apr 16, 2020
90c0e87
Remove unneeded friends
heifner Apr 16, 2020
e33aa23
Update to new snapshot for resume from state test
heifner Apr 16, 2020
b72eb16
Merge pull request #8957 from EOSIO/trx-prune-reflect
heifner Apr 16, 2020
9e34838
Change to_signed_block_v0 to return unique_ptr instead of shared_ptr
heifner Apr 17, 2020
b2f4c57
Add new protocol version for pruned data. Send block type according t…
heifner Apr 17, 2020
8ccc109
Add handling of block types to enqueue_block
heifner Apr 17, 2020
947f6cb
Support receiving signed_block and signed_block_v0
heifner Apr 18, 2020
98201b4
Add support for trx_message_v1 both send/receive
heifner Apr 18, 2020
de97b3c
Advance read ptr on already received trx
heifner Apr 18, 2020
da2d33e
Add p2p-reject-incomplete-blocks option.
heifner Apr 20, 2020
af64b09
Protect agaisnt null packed_transaction_ptr in trx_message_v1. Add mo…
heifner Apr 20, 2020
57906da
Remove generic message placeholders as they will come in after not be…
heifner Apr 20, 2020
aa52039
Implement SHiP v1
huangminghuang Apr 16, 2020
2061e51
Convert full_legacy to full for prunable packing
huangminghuang Apr 22, 2020
0918c87
trying to fix CI issue
huangminghuang Apr 22, 2020
82c5584
Resolve CI issue
huangminghuang Apr 22, 2020
a7d0386
fix get_log_entry reading issue
huangminghuang Apr 22, 2020
afdba27
Revert "fix get_log_entry reading issue"
huangminghuang Apr 22, 2020
2d361c8
fix test failure
huangminghuang Apr 22, 2020
53ad85c
Change block log prune interface
huangminghuang Apr 21, 2020
e3a8078
Add prune transaction to eosio-blocklog
huangminghuang Apr 22, 2020
552ff21
Fix some typo and PR comments
huangminghuang Apr 22, 2020
367bec7
remove outdated comments
huangminghuang Apr 23, 2020
b6c000c
Change comments for history_state_exception
huangminghuang Apr 23, 2020
bc36faf
unittest code refactor
huangminghuang Apr 23, 2020
82175f3
Change on PR comment
huangminghuang Apr 23, 2020
7a435b8
fix typo
huangminghuang Apr 23, 2020
7d30848
add more check
huangminghuang Apr 23, 2020
1b0c6d5
extract chain state log from plugin to library
huangminghuang Apr 23, 2020
f11667d
some more PR review changes
huangminghuang Apr 23, 2020
39fc444
Remove unused proto_generic_messages
heifner Apr 24, 2020
6d20489
Modify prune_all not to convert to none when both signature & cfd are…
huangminghuang Apr 26, 2020
a686c40
remove signature_only type
huangminghuang Apr 27, 2020
7cb1921
Factor out send buffer creation into buffer_factory
heifner Apr 27, 2020
1239ee8
PR comment change
huangminghuang Apr 28, 2020
113beee
More PR comment change
huangminghuang Apr 28, 2020
cda12bf
Merge pull request #8988 from EOSIO/ship-v1
huangminghuang Apr 28, 2020
e65ebb0
Minor changes from review comments
huangminghuang Apr 29, 2020
510dc80
remove unnecessary code
huangminghuang Apr 29, 2020
a168004
some more changes
huangminghuang Apr 29, 2020
1256d08
some more changes
huangminghuang Apr 29, 2020
80806ef
Merge pull request #9022 from EOSIO/prune-cfd-comments-changes
huangminghuang Apr 29, 2020
6f1821a
add missing test
huangminghuang Apr 29, 2020
0efbfd3
label light_validation_sync_test & eosio_blocklog_prune_test as nonpa…
huangminghuang Apr 29, 2020
efd8030
try to run light_validation_sync_test & eosio_blocklog_prune_test as …
huangminghuang Apr 30, 2020
bc34e5e
Revert "try to run light_validation_sync_test & eosio_blocklog_prune_…
huangminghuang Apr 30, 2020
08330f8
restart node before check prune result
huangminghuang May 1, 2020
85668c6
Use optional instead of unique_ptr since we never have to convert to …
heifner May 4, 2020
3e2327a
Use static_variant tag value instead of just hardcoding the value.
heifner May 4, 2020
da26d13
Merge pull request #8977 from EOSIO/net-plugin-cfd
heifner May 4, 2020
e067c04
remove unneeded comment
huangminghuang May 5, 2020
b81da34
Merge pull request #9023 from EOSIO/prune-cfd-add-missing-test
huangminghuang May 5, 2020
991d087
Merge branch 'develop' into prune-cfd-stage-1
huangminghuang May 7, 2020
af07e00
remove deleted copy constructor used by trace_api_plugin
huangminghuang May 7, 2020
8c54b44
Fix merge issue, copy code from prune-cfd-stage-1 branch
heifner May 7, 2020
8d4249a
Remove constructors so object can be created via initilization list
heifner May 7, 2020
1a3520f
Change to better use new signaled packed_transaction_ptr
heifner May 7, 2020
509c8a3
Changes for new packed_transaction
heifner May 7, 2020
d438f91
fix tester merge issue
huangminghuang May 7, 2020
6de6035
Fix merge conflict
heifner May 7, 2020
7f525b2
Update to new state which is combination of develop (wasm constraint …
heifner May 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions libraries/chain/apply_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
"deferred transaction generaction context contains mismatching sender_id",
("expected", sender_id)("actual", context.sender_id)
);
EOS_ASSERT( context.sender_trx_id == trx_context.id, ill_formed_deferred_transaction_generation_context,
EOS_ASSERT( context.sender_trx_id == trx_context.packed_trx.id(), ill_formed_deferred_transaction_generation_context,
"deferred transaction generaction context contains mismatching sender_trx_id",
("expected", trx_context.id)("actual", context.sender_trx_id)
("expected", trx_context.packed_trx.id())("actual", context.sender_trx_id)
);
} else {
emplace_extension(
trx.transaction_extensions,
deferred_transaction_generation_context::extension_id(),
fc::raw::pack( deferred_transaction_generation_context( trx_context.id, sender_id, receiver ) )
fc::raw::pack( deferred_transaction_generation_context( trx_context.packed_trx.id(), sender_id, receiver ) )
);
}
trx.expiration = time_point_sec();
Expand Down Expand Up @@ -762,11 +762,6 @@ vector<account_name> apply_context::get_active_producers() const {
return accounts;
}

bytes apply_context::get_packed_transaction() {
auto r = fc::raw::pack( static_cast<const transaction&>(trx_context.trx) );
return r;
}

void apply_context::update_db_usage( const account_name& payer, int64_t delta, const storage_usage_trace& trace ) {
if( delta > 0 ) {
if( !(privileged || payer == account_name(receiver)
Expand All @@ -783,7 +778,7 @@ void apply_context::update_db_usage( const account_name& payer, int64_t delta, c

int apply_context::get_action( uint32_t type, uint32_t index, char* buffer, size_t buffer_size )const
{
const auto& trx = trx_context.trx;
const auto& trx = trx_context.packed_trx.get_transaction();
const action* act_ptr = nullptr;

if( type == 0 ) {
Expand All @@ -809,15 +804,36 @@ int apply_context::get_action( uint32_t type, uint32_t index, char* buffer, size

int apply_context::get_context_free_data( uint32_t index, char* buffer, size_t buffer_size )const
{
const auto& trx = trx_context.trx;
const packed_transaction::prunable_data_type::prunable_data_t& data = trx_context.packed_trx.get_prunable_data().prunable_data;
const bytes* cfd = nullptr;
if( data.contains<packed_transaction::prunable_data_type::none>() ) {
} else if( data.contains<packed_transaction::prunable_data_type::partial>() ) {
if( index >= data.get<packed_transaction::prunable_data_type::partial>().context_free_segments.size() ) return -1;

if( index >= trx.context_free_data.size() ) return -1;
cfd = trx_context.packed_trx.get_context_free_data(index);
} else {
const std::vector<bytes>& context_free_data =
data.contains<packed_transaction::prunable_data_type::full_legacy>() ?
data.get<packed_transaction::prunable_data_type::full_legacy>().context_free_segments :
data.get<packed_transaction::prunable_data_type::full>().context_free_segments;
if( index >= context_free_data.size() ) return -1;

cfd = &context_free_data[index];
}

if( !cfd ) {
if( control.is_producing_block() ) {
EOS_THROW( subjective_block_production_exception, "pruned context free data not available" );
} else {
EOS_THROW( pruned_context_free_data_bad_block_exception, "pruned context free data not available" );
}
}

auto s = trx.context_free_data[index].size();
auto s = cfd->size();
if( buffer_size == 0 ) return s;

auto copy_size = std::min( buffer_size, s );
memcpy( buffer, trx.context_free_data[index].data(), copy_size );
memcpy( buffer, cfd->data(), copy_size );

return copy_size;
}
Expand Down
73 changes: 47 additions & 26 deletions libraries/chain/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,27 @@ namespace eosio { namespace chain {
}
}

static fc::static_variant<transaction_id_type, pruned_transaction> translate_transaction_receipt(const transaction_id_type& tid, bool) {
return tid;
}
static fc::static_variant<transaction_id_type, pruned_transaction> translate_transaction_receipt(const packed_transaction& ptrx, bool legacy) {
return pruned_transaction(ptrx, legacy);
}
struct transaction_receipt_translator {
bool legacy = true;
fc::static_variant<transaction_id_type, packed_transaction> operator()(const transaction_id_type& tid) const {
return tid;
}
fc::static_variant<transaction_id_type, packed_transaction> operator()(const packed_transaction_v0& ptrx) const {
return packed_transaction(ptrx, legacy);
}
fc::static_variant<transaction_id_type, packed_transaction> operator()(packed_transaction_v0&& ptrx) const {
return packed_transaction(std::move(ptrx), legacy);
}
};

pruned_transaction_receipt::pruned_transaction_receipt(const transaction_receipt& other, bool legacy)
transaction_receipt::transaction_receipt(const transaction_receipt_v0& other, bool legacy)
: transaction_receipt_header(static_cast<const transaction_receipt_header&>(other)),
trx(other.trx.visit([&](const auto& obj) { return translate_transaction_receipt(obj, legacy); }))
trx( other.trx.visit(transaction_receipt_translator{legacy}))
{}

transaction_receipt::transaction_receipt(transaction_receipt_v0&& other, bool legacy)
: transaction_receipt_header(std::move(static_cast<transaction_receipt_header&>(other))),
trx( std::move(other.trx).visit(transaction_receipt_translator{legacy}))
{}

static flat_multimap<uint16_t, block_extension> validate_and_extract_block_extensions(const extensions_type& block_extensions) {
Expand Down Expand Up @@ -74,11 +85,11 @@ namespace eosio { namespace chain {

}

flat_multimap<uint16_t, block_extension> signed_block::validate_and_extract_extensions()const {
flat_multimap<uint16_t, block_extension> signed_block_v0::validate_and_extract_extensions()const {
return validate_and_extract_block_extensions( block_extensions );
}

pruned_block::pruned_block( const signed_block& other, bool legacy )
signed_block::signed_block( const signed_block_v0& other, bool legacy )
: signed_block_header(static_cast<const signed_block_header&>(other)),
prune_state(legacy ? prune_state_type::complete_legacy : prune_state_type::complete),
block_extensions(other.block_extensions)
Expand All @@ -88,46 +99,56 @@ namespace eosio { namespace chain {
}
}

static std::size_t pruned_trx_receipt_packed_size(const pruned_transaction& obj, pruned_transaction::cf_compression_type segment_compression) {
signed_block::signed_block( signed_block_v0&& other, bool legacy )
: signed_block_header(std::move(static_cast<signed_block_header&>(other))),
prune_state(legacy ? prune_state_type::complete_legacy : prune_state_type::complete),
block_extensions(std::move(other.block_extensions))
{
for(auto& trx : other.transactions) {
transactions.emplace_back(std::move(trx), legacy);
}
}

static std::size_t pruned_trx_receipt_packed_size(const packed_transaction& obj, packed_transaction::cf_compression_type segment_compression) {
return obj.maximum_pruned_pack_size(segment_compression);
}
static std::size_t pruned_trx_receipt_packed_size(const transaction_id_type& obj, pruned_transaction::cf_compression_type) {
static std::size_t pruned_trx_receipt_packed_size(const transaction_id_type& obj, packed_transaction::cf_compression_type) {
return fc::raw::pack_size(obj);
}

std::size_t pruned_transaction_receipt::maximum_pruned_pack_size( pruned_transaction::cf_compression_type segment_compression ) const {
std::size_t transaction_receipt::maximum_pruned_pack_size( packed_transaction::cf_compression_type segment_compression ) const {
return fc::raw::pack_size(*static_cast<const transaction_receipt_header*>(this)) + 1 +
trx.visit([&](const auto& obj){ return pruned_trx_receipt_packed_size(obj, segment_compression); });
}

std::size_t pruned_block::maximum_pruned_pack_size( pruned_transaction::cf_compression_type segment_compression ) const {
std::size_t signed_block::maximum_pruned_pack_size( packed_transaction::cf_compression_type segment_compression ) const {
std::size_t result = fc::raw::pack_size(fc::unsigned_int(transactions.size()));
for(const pruned_transaction_receipt& r: transactions) {
for(const transaction_receipt& r: transactions) {
result += r.maximum_pruned_pack_size( segment_compression );
}
return fc::raw::pack_size(*static_cast<const signed_block_header*>(this)) + fc::raw::pack_size(prune_state) + result + fc::raw::pack_size(block_extensions);
}

flat_multimap<uint16_t, block_extension> pruned_block::validate_and_extract_extensions()const {
flat_multimap<uint16_t, block_extension> signed_block::validate_and_extract_extensions()const {
return validate_and_extract_block_extensions( block_extensions );
}

signed_block_ptr pruned_block::to_signed_block() const {
fc::optional<signed_block_v0> signed_block::to_signed_block_v0() const {
if (prune_state != prune_state_type::complete_legacy)
return signed_block_ptr{};
return {};

auto result = std::make_shared<signed_block>(*static_cast<const signed_block_header*>(this));
result->block_extensions = this->block_extensions;
signed_block_v0 result(*static_cast<const signed_block_header*>(this));
result.block_extensions = this->block_extensions;

auto visitor = overloaded{
[](const transaction_id_type &id) -> transaction_receipt::trx_type { return id; },
[](const pruned_transaction &trx) -> transaction_receipt::trx_type {
const auto& legacy = trx.get_prunable_data().prunable_data.get<prunable_transaction_data::full_legacy>();
return packed_transaction(trx.get_packed_transaction(), legacy.signatures, legacy.packed_context_free_data, trx.get_compression());
[](const transaction_id_type &id) -> transaction_receipt_v0::trx_type { return id; },
[](const packed_transaction &trx) -> transaction_receipt_v0::trx_type {
const auto& legacy = trx.get_prunable_data().prunable_data.get<packed_transaction::prunable_data_type::full_legacy>();
return packed_transaction_v0(trx.get_packed_transaction(), legacy.signatures, legacy.packed_context_free_data, trx.get_compression());
}};

for (const pruned_transaction_receipt &r : transactions){
result->transactions.emplace_back(transaction_receipt{r, r.trx.visit(visitor)});
for (const transaction_receipt &r : transactions){
result.transactions.emplace_back(transaction_receipt_v0{r, r.trx.visit(visitor)});
}
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/block_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eosio { namespace chain {
return fc::endian_reverse_u32(id._hash[0]);
}

block_id_type block_header::id()const
block_id_type block_header::calculate_id()const
{
// Do not include signed_block_header attributes in id, specifically exclude producer_signature.
block_id_type result = digest(); //fc::sha256::hash(*static_cast<const block_header*>(this));
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/block_header_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ namespace eosio { namespace chain {

block_header_state result( std::move( *static_cast<detail::block_header_state_common*>(this) ) );

result.id = h.id();
result.id = h.calculate_id();
result.header = h;

result.header_exts = std::move(exts);
Expand Down
Loading