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

Commit

Permalink
Merge pull request #633 from EOSIO/stat-106-fake-producer
Browse files Browse the repository at this point in the history
Use eos for fake producer of Block 0. STAT-106
  • Loading branch information
heifner authored Nov 6, 2017
2 parents 6e846aa + ffb2fd2 commit 1c0f8b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 1c0f8b2

Please sign in to comment.