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

Use eos for fake producer of Block 0. STAT-106 #633

Merged
merged 1 commit into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,7 @@ void chain_controller::initialize_chain(chain_initializer_interface& starter)

// create a dummy block and cycle for our dummy transactions to send to applied_irreversible_block below
signed_block block{};
block.producer = config::EosContractName;
block.cycles.emplace_back();
block.cycles[0].emplace_back();

Expand Down
2 changes: 1 addition & 1 deletion plugins/db_plugin/db_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void db_plugin_impl::_process_irreversible_block(const signed_block& block)
FC_ASSERT(block_num < 2, "Expected start of block, instead received block_num: ${bn}", ("bn", block_num));
// Currently we are creating a 'fake' block in chain_controller::initialize_chain() since initial accounts
// and producers are not written to the block log. If this is the fake block, indicate it as block_num 0.
if (block_num == 1 && block.producer == AccountName{}) {
if (block_num == 1 && block.producer == config::EosContractName) {
block_num = 0;
}
} else {
Expand Down