Improve should_replace on NonceAndGasPrice (#8980)

* Additional tests for NonceAndGasPrice::should_replace.

* Fix should_replace in the distinct sender case.

* Use natural priority ordering to simplify should_replace.
This commit is contained in:
Jim Posen
2018-06-27 15:59:36 -04:00
committed by Marek Kotewicz
parent 38c31c880f
commit 9b5483a71b
3 changed files with 116 additions and 35 deletions

View File

@@ -23,9 +23,9 @@ use pool::{verifier, VerifiedTransaction};
#[derive(Clone)]
pub struct Tx {
nonce: u64,
gas: u64,
gas_price: u64,
pub nonce: u64,
pub gas: u64,
pub gas_price: u64,
}
impl Default for Tx {