mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: enable tx inserts via p2p (#2214)
This commit is contained in:
@ -528,14 +528,15 @@ where
|
||||
this.on_good_import(hash);
|
||||
}
|
||||
Err(err) => {
|
||||
if err.is_bad_transaction() {
|
||||
// if we're syncing and the transaction is bad we ignore it, otherwise we
|
||||
// penalize the peer that sent the bad transaction with the assumption that the
|
||||
// peer should have known that this transaction is bad. (e.g. consensus rules)
|
||||
if err.is_bad_transaction() && !this.network.is_syncing() {
|
||||
trace!(target: "net::tx", ?err, "Bad transaction import");
|
||||
// TODO disabled until properly tested
|
||||
// this.on_bad_import(*err.hash());
|
||||
this.on_good_import(*err.hash());
|
||||
} else {
|
||||
this.on_good_import(*err.hash());
|
||||
this.on_bad_import(*err.hash());
|
||||
continue
|
||||
}
|
||||
this.on_good_import(*err.hash());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user