mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
Revert "chore: enable tx inserts via p2p" (#2252)
This commit is contained in:
committed by
GitHub
parent
6be4be6b2a
commit
c67c944a1f
@@ -528,15 +528,14 @@ where
|
||||
this.on_good_import(hash);
|
||||
}
|
||||
Err(err) => {
|
||||
// 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() {
|
||||
if err.is_bad_transaction() {
|
||||
trace!(target: "net::tx", ?err, "Bad transaction import");
|
||||
this.on_bad_import(*err.hash());
|
||||
continue
|
||||
// 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_good_import(*err.hash());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,9 @@ pub enum InvalidPoolTransactionError {
|
||||
/// respect the max_init_code_size.
|
||||
#[error("Transaction's size {0} exceeds max_init_code_size {1}.")]
|
||||
ExceedsMaxInitCodeSize(usize, usize),
|
||||
/// Thrown if the transaction contains an invalid signature
|
||||
#[error("Invalid sender")]
|
||||
AccountNotFound,
|
||||
/// Thrown if the input data of a transaction is greater
|
||||
/// than some meaningful limit a user might use. This is not a consensus error
|
||||
/// making the transaction invalid, rather a DOS protection.
|
||||
|
||||
Reference in New Issue
Block a user