mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: calculate state root for auto-seal (#2744)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
@ -200,6 +200,11 @@ where
|
||||
BlockBody { transactions: body, ommers: vec![], withdrawals: None };
|
||||
header.gas_used = gas_used;
|
||||
|
||||
// calculate the state root
|
||||
let state_root =
|
||||
executor.db().db.0.state_root(post_state.clone()).unwrap();
|
||||
header.state_root = state_root;
|
||||
|
||||
storage.insert_new_block(header.clone(), body);
|
||||
|
||||
let new_hash = storage.best_hash;
|
||||
|
||||
Reference in New Issue
Block a user