未验证 提交 1c0f8b20 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #633 from EOSIO/stat-106-fake-producer

Use eos for fake producer of Block 0. STAT-106
......@@ -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();
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册