Skip to content

Commit

Permalink
chore: prevent spam logs (#6319)
Browse files Browse the repository at this point in the history
Description
---
Prevent spam logs from lmdb_db.rs when many inputs and outputs are
present in the blockchain - follow on to #6312.

Motivation and Context
---
More spam logs existed.

How Has This Been Tested?
---
System-level testing.

What process can a PR reviewer use to test or verify this change?
---
See code changes.

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
hansieodendaal authored May 6, 2024
1 parent 1b5e217 commit 8cbfeda
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2063,13 +2063,11 @@ impl BlockchainBackend for LMDBDatabase {
}

fn fetch_output(&self, output_hash: &HashOutput) -> Result<Option<OutputMinedInfo>, ChainStorageError> {
debug!(target: LOG_TARGET, "Fetch output: {}", output_hash.to_hex());
let txn = self.read_transaction()?;
self.fetch_output_in_txn(&txn, output_hash.as_slice())
}

fn fetch_input(&self, output_hash: &HashOutput) -> Result<Option<InputMinedInfo>, ChainStorageError> {
debug!(target: LOG_TARGET, "Fetch input: {}", output_hash.to_hex());
let txn = self.read_transaction()?;
self.fetch_input_in_txn(&txn, output_hash.as_slice())
}
Expand Down

0 comments on commit 8cbfeda

Please sign in to comment.