Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/4800-clear-tx-gas-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Clear tx gas map after every block to avoid indefinite accumulation
([\#4800](https://github.com/anoma/namada/pull/4800))
7 changes: 6 additions & 1 deletion crates/state/src/wl_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@ where
let mut batch = D::batch();
self.commit_write_log_block(&mut batch)
.into_storage_result()?;
self.commit_block_from_batch(batch).into_storage_result()
self.commit_block_from_batch(batch).into_storage_result()?;

// Clear the tx gas map
self.in_mem.commit_only_data.tx_gas = Default::default();

Ok(())
}

/// Commit the current block's write log to the storage. Starts a new block
Expand Down
Loading