Skip to content

Commit

Permalink
Revert "Skip storing all zero cycles in db when disable script"
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec authored May 12, 2024
1 parent d3e65cb commit 53095a2
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,20 +802,11 @@ impl ChainService {
mmr.push(b.digest())
.map_err(|e| InternalErrorKind::MMR.other(e))?;

// when `disable_script` is true, `cache_entries` is a array with all `0`
// there is no need to store them in db
let verify_entries: Option<&[Completed]> =
if switch.disable_script() {
None
} else {
Some(&cache_entries)
};

self.insert_ok_ext(
&txn,
&b.header().hash(),
ext.clone(),
verify_entries,
Some(&cache_entries),
Some(txs_sizes),
)?;

Expand Down

0 comments on commit 53095a2

Please sign in to comment.