mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 16:05:41 +00:00
Tone down warnings when resubmitting to the pool. (#4294)
* Tone down warnings. * Fix the fix. * Add some debug info. * More logs. * Update logging.
This commit is contained in:
committed by
Gavin Wood
parent
c42cdf185c
commit
7714bfca8e
@@ -91,8 +91,12 @@ impl<H: hash::Hash + traits::Member + Serialize, H2: Clone + fmt::Debug> Listene
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Transaction was removed as invalid.
|
/// Transaction was removed as invalid.
|
||||||
pub fn invalid(&mut self, tx: &H) {
|
pub fn invalid(&mut self, tx: &H, warn: bool) {
|
||||||
warn!(target: "txpool", "Extrinsic invalid: {:?}", tx);
|
if warn {
|
||||||
|
warn!(target: "txpool", "Extrinsic invalid: {:?}", tx);
|
||||||
|
} else {
|
||||||
|
debug!(target: "txpool", "Extrinsic invalid: {:?}", tx);
|
||||||
|
}
|
||||||
self.fire(tx, |watcher| watcher.invalid());
|
self.fire(tx, |watcher| watcher.invalid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ impl<B: ChainApi> ValidatedPool<B> {
|
|||||||
Err(err.into())
|
Err(err.into())
|
||||||
},
|
},
|
||||||
ValidatedTransaction::Unknown(hash, err) => {
|
ValidatedTransaction::Unknown(hash, err) => {
|
||||||
self.listener.write().invalid(&hash);
|
self.listener.write().invalid(&hash, false);
|
||||||
Err(err.into())
|
Err(err.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -311,8 +311,8 @@ impl<B: ChainApi> ValidatedPool<B> {
|
|||||||
match final_status {
|
match final_status {
|
||||||
Status::Future => listener.future(&hash),
|
Status::Future => listener.future(&hash),
|
||||||
Status::Ready => listener.ready(&hash, None),
|
Status::Ready => listener.ready(&hash, None),
|
||||||
Status::Failed => listener.invalid(&hash),
|
|
||||||
Status::Dropped => listener.dropped(&hash, None),
|
Status::Dropped => listener.dropped(&hash, None),
|
||||||
|
Status::Failed => listener.invalid(&hash, initial_status.is_some()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -478,7 +478,7 @@ impl<B: ChainApi> ValidatedPool<B> {
|
|||||||
|
|
||||||
let mut listener = self.listener.write();
|
let mut listener = self.listener.write();
|
||||||
for tx in &invalid {
|
for tx in &invalid {
|
||||||
listener.invalid(&tx.hash);
|
listener.invalid(&tx.hash, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
invalid
|
invalid
|
||||||
@@ -506,7 +506,7 @@ fn fire_events<H, H2, Ex>(
|
|||||||
base::Imported::Ready { ref promoted, ref failed, ref removed, ref hash } => {
|
base::Imported::Ready { ref promoted, ref failed, ref removed, ref hash } => {
|
||||||
listener.ready(hash, None);
|
listener.ready(hash, None);
|
||||||
for f in failed {
|
for f in failed {
|
||||||
listener.invalid(f);
|
listener.invalid(f, true);
|
||||||
}
|
}
|
||||||
for r in removed {
|
for r in removed {
|
||||||
listener.dropped(&r.hash, Some(hash));
|
listener.dropped(&r.hash, Some(hash));
|
||||||
|
|||||||
Reference in New Issue
Block a user