We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54851de + 1c9aa29 commit 16ec222Copy full SHA for 16ec222
.changelog/unreleased/improvements/4800-clear-tx-gas-map.md
@@ -0,0 +1,2 @@
1
+- Clear tx gas map after every block to avoid indefinite accumulation
2
+ ([\#4800](https://github.com/anoma/namada/pull/4800))
crates/state/src/wl_state.rs
@@ -291,7 +291,12 @@ where
291
let mut batch = D::batch();
292
self.commit_write_log_block(&mut batch)
293
.into_storage_result()?;
294
- self.commit_block_from_batch(batch).into_storage_result()
+ self.commit_block_from_batch(batch).into_storage_result()?;
295
+
296
+ // Clear the tx gas map
297
+ self.in_mem.commit_only_data.tx_gas = Default::default();
298
299
+ Ok(())
300
}
301
302
/// Commit the current block's write log to the storage. Starts a new block
0 commit comments