Skip to content

Commit

Permalink
Renames finalize_tx_hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Oct 10, 2023
1 parent cd0ceaa commit 2e535a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/ledger/storage/write_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 2e535a6

Please sign in to comment.