mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-08 02:01:14 +03:00
less chatty Testnet1 outputs (#316)
Fixes #281 by doing: - "Starting validation pipeline for " -> "Processing " - stdout logging default = Warning - ERR -> INFO for "Transaction rejected: Already in pool" -- only for netadapter transaction_received, which (hopefully!) only gets tx from peers, and lots of those will be duplicates, that's good and not an error. * Downgrade ERR even down to DEBUG. Also let Transaction rejected show tx hash, so users can check if such a rejection is for the payment they expected, or just any random peer sending in some old and already known tx.
This commit is contained in:
parent
8ce494536e
commit
e20975136e
3 changed files with 7 additions and 6 deletions
|
@ -51,9 +51,9 @@ pub fn process_block(b: &Block, mut ctx: BlockContext) -> Result<Option<Tip>, Er
|
|||
// TODO should just take a promise for a block with a full header so we don't
|
||||
// spend resources reading the full block when its header is invalid
|
||||
|
||||
info!(
|
||||
debug!(
|
||||
LOGGER,
|
||||
"Starting validation pipeline for block {} at {} with {} inputs and {} outputs.",
|
||||
"Processing block {} at {} with {} inputs and {} outputs.",
|
||||
b.hash(),
|
||||
b.header.height,
|
||||
b.inputs.len(),
|
||||
|
@ -94,9 +94,9 @@ pub fn process_block(b: &Block, mut ctx: BlockContext) -> Result<Option<Tip>, Er
|
|||
|
||||
/// Process the block header
|
||||
pub fn process_block_header(bh: &BlockHeader, mut ctx: BlockContext) -> Result<Option<Tip>, Error> {
|
||||
info!(
|
||||
debug!(
|
||||
LOGGER,
|
||||
"Starting validation pipeline for block header {} at {}.",
|
||||
"Processing header {} at {}.",
|
||||
bh.hash(),
|
||||
bh.height
|
||||
);
|
||||
|
|
|
@ -63,7 +63,7 @@ port = 13414
|
|||
log_to_stdout = true
|
||||
|
||||
# Log level for stdout: Critical, Error, Warning, Info, Debug, Trace
|
||||
stdout_log_level = "Debug"
|
||||
stdout_log_level = "Warning"
|
||||
|
||||
# Whether to log to a file
|
||||
log_to_file = true
|
||||
|
|
|
@ -57,8 +57,9 @@ impl NetAdapter for NetToChainAdapter {
|
|||
source.identifier,
|
||||
);
|
||||
|
||||
let h = tx.hash();
|
||||
if let Err(e) = self.tx_pool.write().unwrap().add_to_memory_pool(source, tx) {
|
||||
error!(LOGGER, "Transaction rejected: {:?}", e);
|
||||
debug!(LOGGER, "Transaction {} rejected: {:?}", h, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue