less chatty Testnet1 outputs ()

Fixes  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:
Simon B 2017-11-18 21:34:05 +01:00 committed by Ignotus Peverell
parent 8ce494536e
commit e20975136e
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211
3 changed files with 7 additions and 6 deletions

View file

@ -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
);

View file

@ -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

View file

@ -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);
}
}