Skip to content

Commit

Permalink
chain: save txs_sizes when switch is Switch::DISABLE_ALL
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Mar 27, 2023
1 parent 687fc0f commit 9334819
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,12 @@ impl ChainService {
.collect::<Result<Vec<Completed>, Error>>()
{
Ok(cache_entries) => {
let txs_sizes = resolved
.iter()
.map(|rtx| {
rtx.transaction.data().serialized_size_in_block() as u64
})
.collect();
txn.attach_block(b)?;
attach_block_cell(&txn, b)?;
mmr.push(b.digest())
Expand All @@ -835,7 +841,7 @@ impl ChainService {
&b.header().hash(),
ext.clone(),
Some(&cache_entries),
None,
Some(txs_sizes),
)?;
}
Err(err) => {
Expand Down

0 comments on commit 9334819

Please sign in to comment.