From 2e535a63efd31b37c6d42bceb0dec515546a0541 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Mon, 9 Oct 2023 17:50:42 +0200 Subject: [PATCH] Renames `finalize_tx_hashes` --- apps/src/lib/node/ledger/shell/finalize_block.rs | 2 +- core/src/ledger/storage/write_log.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/src/lib/node/ledger/shell/finalize_block.rs b/apps/src/lib/node/ledger/shell/finalize_block.rs index 5c6afae151e..5772c2c74b2 100644 --- a/apps/src/lib/node/ledger/shell/finalize_block.rs +++ b/apps/src/lib/node/ledger/shell/finalize_block.rs @@ -93,7 +93,7 @@ where for hash in self.wl_storage.storage.iter_replay_protection() { self.wl_storage .write_log - .finalize_tx_hashes(hash) + .finalize_tx_hash(hash) .expect("Failed tx hashes finalization") } diff --git a/core/src/ledger/storage/write_log.rs b/core/src/ledger/storage/write_log.rs index 45acfd9c55f..e302baa9fe5 100644 --- a/core/src/ledger/storage/write_log.rs +++ b/core/src/ledger/storage/write_log.rs @@ -715,7 +715,7 @@ impl WriteLog { /// Move the transaction hash of the previous block to the list of all /// blocks. This functions should be called at the beginning of the block /// processing - pub fn finalize_tx_hashes(&mut self, hash: Hash) -> Result<()> { + pub fn finalize_tx_hash(&mut self, hash: Hash) -> Result<()> { if self .replay_protection .insert(hash, ReProtStorageModification::Finalize) @@ -1007,7 +1007,7 @@ mod tests { // finalize previous hashes for tx in ["tx2", "tx3"] { write_log - .finalize_tx_hashes(Hash::sha256(tx.as_bytes())) + .finalize_tx_hash(Hash::sha256(tx.as_bytes())) .unwrap(); }