Replace Index for Nonce (#2740)

* replace Index for Nonce

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Juan
2023-07-14 10:46:49 +02:00
committed by GitHub
parent 24d6e46ad0
commit 3513b7e019
44 changed files with 366 additions and 368 deletions
@@ -18,7 +18,7 @@
pub use bp_polkadot_core::{
AccountId, AccountInfoStorageMapKeyProvider, AccountPublic, Balance, Block, BlockNumber, Hash,
Hasher, Hashing, Header, Index, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic,
Hasher, Hashing, Header, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic,
EXTRA_STORAGE_PROOF_SIZE, TX_EXTRA_BYTES,
};
@@ -140,7 +140,7 @@ pub type SignedExtra = (
CheckTxVersion,
CheckGenesis<Hash>,
CheckEra<Hash>,
CheckNonce<Index>,
CheckNonce<Nonce>,
CheckWeight,
ChargeTransactionPayment<Balance>,
BridgeRejectObsoleteHeadersAndMessages,
@@ -159,12 +159,12 @@ pub trait BridgeHubSignedExtension {
transaction_version: u32,
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
genesis_hash: Hash,
nonce: Index,
nonce: Nonce,
tip: Balance,
) -> Self;
/// Return transaction nonce.
fn nonce(&self) -> Index;
fn nonce(&self) -> Nonce;
/// Return transaction tip.
fn tip(&self) -> Balance;
@@ -177,7 +177,7 @@ impl BridgeHubSignedExtension for SignedExtension {
transaction_version: u32,
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
genesis_hash: Hash,
nonce: Index,
nonce: Nonce,
tip: Balance,
) -> Self {
GenericSignedExtension::new(
@@ -209,7 +209,7 @@ impl BridgeHubSignedExtension for SignedExtension {
}
/// Return transaction nonce.
fn nonce(&self) -> Index {
fn nonce(&self) -> Nonce {
self.payload.5 .0
}