File tree Expand file tree Collapse file tree
shasta/src/node/proposal_manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,6 +488,10 @@ impl BatchManager {
488488
489489 let txs = txs. to_vec ( ) ;
490490
491+ // Store block data for checkpoint before block is moved
492+ let block_hash = block. header . hash_slow ( ) ;
493+ let block_state_root = block. header . state_root ( ) ;
494+
491495 // TODO validate block params
492496 self . batch_builder
493497 . recover_from (
@@ -500,6 +504,15 @@ impl BatchManager {
500504 is_forced_inclusion,
501505 )
502506 . await ?;
507+
508+ // Surge: Set the checkpoint for the recovered block
509+ // This is the L2 block state that should be used as checkpoint for the proposal
510+ self . batch_builder . set_proposal_checkpoint ( Checkpoint {
511+ blockNumber : U48 :: from ( block_height) ,
512+ stateRoot : block_state_root,
513+ blockHash : block_hash,
514+ } ) ?;
515+
503516 Ok ( ( ) )
504517 }
505518
You can’t perform that action at this time.
0 commit comments