Skip to content

Commit

Permalink
runtime: Clear verification trace after block verification
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Jan 20, 2023
1 parent 3a0c6df commit c564f71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/5148.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime: Clear verification trace after block verification
3 changes: 3 additions & 0 deletions runtime/src/consensus/tendermint/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ impl Verifier {
}
.map_err(|err| Error::VerificationFailed(err.into()))?;

// Clear verification trace as it could otherwise lead to infinite memory growth.
instance.state.verification_trace.clear();

cache.update_verified_block(&verified_block);
self.update_insecure_posix_time(&verified_block);

Expand Down

0 comments on commit c564f71

Please sign in to comment.