From e321a645c9c1ce83cc7c3b5d64644849289a2f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Thu, 18 Oct 2018 13:36:54 +0200 Subject: [PATCH] Fixes tests on master (#929) --- .../core/transaction-pool/graph/src/pool.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/substrate/core/transaction-pool/graph/src/pool.rs b/substrate/core/transaction-pool/graph/src/pool.rs index 3625c8f1f1..9f343c23d1 100644 --- a/substrate/core/transaction-pool/graph/src/pool.rs +++ b/substrate/core/transaction-pool/graph/src/pool.rs @@ -331,12 +331,12 @@ mod tests { if nonce < block_number { Ok(TransactionValidity::Invalid) } else { - Ok(TransactionValidity::Valid( - 4, - if nonce > block_number { vec![vec![nonce as u8 - 1]] } else { vec![] }, - vec![vec![nonce as u8]], - 3, - )) + Ok(TransactionValidity::Valid { + priority: 4, + requires: if nonce > block_number { vec![vec![nonce as u8 - 1]] } else { vec![] }, + provides: vec![vec![nonce as u8]], + longevity: 3, + }) } } @@ -388,7 +388,7 @@ mod tests { })).unwrap(); // then - assert_eq!(pool.ready(|pending| pending.map(|tx| tx.hash.clone()).collect::>()), vec![hash]); + assert_eq!(pool.ready().map(|v| v.hash).collect::>(), vec![hash]); } #[test] @@ -479,7 +479,7 @@ mod tests { pool.clear_stale(&BlockId::Number(5)).unwrap(); // then - assert_eq!(pool.all(3).len(), 0); + assert_eq!(pool.ready().count(), 0); assert_eq!(pool.status().future, 0); assert_eq!(pool.status().ready, 0); // make sure they are temporarily banned as well