From d0b2df07db69026c9b07be4e1e2c366ceba69c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 20 Jun 2016 10:32:52 +0200 Subject: [PATCH] Removing priority on local transactions --- ethcore/src/miner/transaction_queue.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index 98aa492d1..385b2e473 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -167,11 +167,6 @@ impl PartialOrd for TransactionOrder { impl Ord for TransactionOrder { fn cmp(&self, b: &TransactionOrder) -> Ordering { - // Local transactions should always have priority - if self.origin != b.origin { - return self.origin.cmp(&b.origin); - } - // First check nonce_height if self.nonce_height != b.nonce_height { return self.nonce_height.cmp(&b.nonce_height); @@ -1087,7 +1082,7 @@ mod test { } #[test] - fn should_prioritize_local_transactions() { + fn should_not_prioritize_local_transactions() { // given let mut txq = TransactionQueue::new(); let (tx, tx2) = new_txs(U256::from(1)); @@ -1098,8 +1093,8 @@ mod test { // then let top = txq.top_transactions(); - assert_eq!(top[0], tx2); - assert_eq!(top[1], tx); + assert_eq!(top[0], tx); + assert_eq!(top[1], tx2); assert_eq!(top.len(), 2); }