Replace system config Index for Nonce (#14290)

* replace Index by Nonce

* replace Index by Nonce

* replace Index by Nonce

* replace Index by Nonce

* replace Index by Nonce

* wip

* remove index in lieu of nonce

* wip

* remove accountnonce in lieu of nonce

* add minor improvement

* rebase and merge conflicts
This commit is contained in:
Juan
2023-07-14 08:56:48 +02:00
committed by GitHub
parent 0fbeb31d50
commit 6a29a70a92
132 changed files with 234 additions and 235 deletions
@@ -39,7 +39,7 @@ use sp_runtime::{
};
use std::{collections::BTreeSet, pin::Pin, sync::Arc};
use substrate_test_runtime_client::{
runtime::{Block, Extrinsic, ExtrinsicBuilder, Hash, Header, Index, Transfer, TransferData},
runtime::{Block, Extrinsic, ExtrinsicBuilder, Hash, Header, Nonce, Transfer, TransferData},
AccountKeyring::*,
ClientBlockImportExt,
};
@@ -119,7 +119,7 @@ fn early_nonce_should_be_culled() {
.ready()
.map(|a| TransferData::try_from(&a.data).unwrap().nonce)
.collect();
assert_eq!(pending, Vec::<Index>::new());
assert_eq!(pending, Vec::<Nonce>::new());
}
#[test]
@@ -132,7 +132,7 @@ fn late_nonce_should_be_queued() {
.ready()
.map(|a| TransferData::try_from(&a.data).unwrap().nonce)
.collect();
assert_eq!(pending, Vec::<Index>::new());
assert_eq!(pending, Vec::<Nonce>::new());
block_on(pool.submit_one(&BlockId::number(0), SOURCE, uxt(Alice, 209))).unwrap();
let pending: Vec<_> = pool
@@ -182,7 +182,7 @@ fn should_ban_invalid_transactions() {
.ready()
.map(|a| TransferData::try_from(&a.data).unwrap().nonce)
.collect();
assert_eq!(pending, Vec::<Index>::new());
assert_eq!(pending, Vec::<Nonce>::new());
// then
block_on(pool.submit_one(&BlockId::number(0), SOURCE, uxt.clone())).unwrap_err();