Added --tx-queue-no-early-reject flag to disable early tx queue rejects (#9143)
* Added --tx-queue-no-early-reject flag to disable early tx queue rejects because of low gas price * Fixed failing tests, clarified comments and simplified no_early_reject field name. * Added test case for the --tx-queue-no-early-reject flag
This commit is contained in:
committed by
Andronik Ordian
parent
4848c384cd
commit
1b1941a896
@@ -243,11 +243,15 @@ impl TransactionQueue {
|
||||
let options = self.options.read().clone();
|
||||
|
||||
let transaction_to_replace = {
|
||||
let pool = self.pool.read();
|
||||
if pool.is_full() {
|
||||
pool.worst_transaction().map(|worst| (pool.scoring().clone(), worst))
|
||||
} else {
|
||||
if options.no_early_reject {
|
||||
None
|
||||
} else {
|
||||
let pool = self.pool.read();
|
||||
if pool.is_full() {
|
||||
pool.worst_transaction().map(|worst| (pool.scoring().clone(), worst))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user