summaryrefslogtreecommitdiff
path: root/eth-wire/src/loops/worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'eth-wire/src/loops/worker.rs')
-rw-r--r--eth-wire/src/loops/worker.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/eth-wire/src/loops/worker.rs b/eth-wire/src/loops/worker.rs
index 81eb59c..9139137 100644
--- a/eth-wire/src/loops/worker.rs
+++ b/eth-wire/src/loops/worker.rs
@@ -199,13 +199,16 @@ fn sync_chain_removed(
// Only keep incoming transaction that are not reconfirmed
// TODO study risk of accepting only mined transactions for faster recovery
- for tx in removed.iter().filter_map(|sync_tx| {
- (sync_tx.tx.to == Some(*addr)
- && txs
- .iter()
- .all(|it| it.tx.hash != sync_tx.tx.hash || it.confirmations < min_confirmation))
- .then(|| &sync_tx.tx)
- }) {
+ for tx in removed
+ .iter()
+ .filter(|sync_tx| {
+ sync_tx.tx.to == Some(*addr)
+ && txs
+ .iter()
+ .all(|it| it.tx.hash != sync_tx.tx.hash || it.confirmations < min_confirmation)
+ })
+ .map(|s| &s.tx)
+ {
match InMetadata::decode(&tx.input) {
Ok(metadata) => match metadata {
InMetadata::Credit { reserve_pub } => {