Skip to content

Commit bef8d8d

Browse files
authored
Merge pull request #220 from eosnetworkfoundation/elmato/block-extra-data
[1.0] Use updated silkworm with the new block-extra-data storage
2 parents 9c890f6 + 4020a49 commit bef8d8d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

external/silkworm

src/block_conversion_plugin.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ class block_conversion_plugin_impl : std::enable_shared_from_this<block_conversi
129129
new_block.header.parent_hash = last_evm_block.header.hash();
130130
new_block.header.transactions_root = silkworm::kEmptyRoot;
131131
// Note: can be null
132-
new_block.consensus_parameter_index = last_evm_block.consensus_parameter_index;
132+
auto cpi = last_evm_block.get_consensus_parameter_index();
133+
if(cpi.has_value()) {
134+
new_block.set_consensus_parameter_index(cpi);
135+
}
133136
return new_block;
134137
}
135138

@@ -293,9 +296,9 @@ class block_conversion_plugin_impl : std::enable_shared_from_this<block_conversi
293296
.gas_sset = std::visit([](auto&& arg) -> auto& { return arg.gas_parameter.gas_sset; }, new_config),
294297
}
295298
};
296-
curr.consensus_parameter_index = consensus_param.hash();
299+
curr.set_consensus_parameter_index(consensus_param.hash());
297300

298-
silkworm::db::update_consensus_parameters(appbase::app().get_plugin<blockchain_plugin>().get_tx(), *curr.consensus_parameter_index, consensus_param);
301+
silkworm::db::update_consensus_parameters(appbase::app().get_plugin<blockchain_plugin>().get_tx(), *curr.get_consensus_parameter_index(), consensus_param);
299302
}
300303

301304
for_each_action(*new_block, [this, &curr, &block_version](const auto& act){

tests/nodeos_eos_evm_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
cmd="set account permission eosio.evm active --add-code -p eosio.evm@active"
233233
prodNode.processCleosCmd(cmd, cmd, silentErrors=True, returnType=ReturnType.raw)
234234

235-
trans = prodNode.pushMessage(evmAcc.name, "init", '{"chainid":15555, "fee_params": {"gas_price": "150000000000", "miner_cut": 10000, "ingress_bridge_fee": null}}', '-p eosio.evm')
235+
trans = prodNode.pushMessage(evmAcc.name, "init", '{"chainid":15555, "fee_params": {"gas_price": "150000000000", "miner_cut": 10000, "ingress_bridge_fee": "0.0001 EOS"}}', '-p eosio.evm')
236236

237237
prodNode.waitForTransBlockIfNeeded(trans[1], True)
238238

0 commit comments

Comments
 (0)