Skip to content

Commit

Permalink
fix: fix initial submitted transaction hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyr committed Dec 20, 2021
1 parent ebab366 commit 3bb271e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/block-producer/src/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@ impl BlockProducer {
committed_tip_block_hash: H256::zero(),
},
last_submitted_tx_hash: {
let hash = store.get_tip_block_hash()?;
Arc::new(smol::lock::RwLock::new(hash))
let tip_block_hash = store.get_tip_block_hash()?;
let committed_info = store
.get_l2block_committed_info(&tip_block_hash)?
.ok_or_else(|| anyhow!("can't find committed info for tip block"))?;
Arc::new(smol::lock::RwLock::new(
committed_info.transaction_hash().unpack(),
))
},
store,
};
Expand Down

0 comments on commit 3bb271e

Please sign in to comment.