mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-29 22:51:03 +00:00
Transaction queue tests update (#4734)
* shuffle tests * update tests * inc_nonce -> increment_nonce
This commit is contained in:
@@ -231,7 +231,7 @@ mod tests {
|
||||
use sc_transaction_pool::{
|
||||
BasicPool,
|
||||
txpool::Options,
|
||||
testing::*,
|
||||
testing::api::*,
|
||||
};
|
||||
use sp_transaction_pool::TransactionPool;
|
||||
use sp_runtime::generic::BlockId;
|
||||
@@ -242,10 +242,7 @@ mod tests {
|
||||
use sc_basic_authorship::ProposerFactory;
|
||||
|
||||
fn api() -> TestApi {
|
||||
let mut api = TestApi::default();
|
||||
api.nonce_offset = 0;
|
||||
|
||||
api
|
||||
TestApi::empty()
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -422,6 +419,7 @@ mod tests {
|
||||
finalize: false,
|
||||
}).await.unwrap();
|
||||
let created_block = rx.await.unwrap().unwrap();
|
||||
pool.api().increment_nonce(Alice.into());
|
||||
|
||||
// assert that the background task returns ok
|
||||
assert_eq!(
|
||||
@@ -451,6 +449,7 @@ mod tests {
|
||||
}).await.is_ok());
|
||||
assert!(rx1.await.unwrap().is_ok());
|
||||
assert!(backend.blockchain().header(BlockId::Number(1)).unwrap().is_some());
|
||||
pool.api().increment_nonce(Alice.into());
|
||||
|
||||
assert!(pool.submit_one(&BlockId::Number(2), uxt(Alice, 2)).await.is_ok());
|
||||
let (tx2, rx2) = futures::channel::oneshot::channel();
|
||||
|
||||
Reference in New Issue
Block a user