mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
Tagged transaction queue integration (#893)
* Make the graph generic. * Adapting pool API for the graph. * Merge pool & graph. * Restructure. * Fix test of transaction pool. * Get rid of node/transaction-pool. * Compilation fixes. * Test7 * Fix compilation of tests. * Revert runtime changes. * Add validate_transaction to test-runtime. * Fix RPC tests. * Add clearing of the old transactions. * Trigger pool events. * Use new queue API. * Fix wasm build, re-export Hasher. * No warning if validate transaction fails. * Get rid of Into<u64> and use As
This commit is contained in:
@@ -81,7 +81,6 @@ impl<'a, Number: 'a, Hash: 'a + HashT, DigestItem: 'a> Deserialize<'a> for Heade
|
||||
}
|
||||
}
|
||||
|
||||
// TODO [ToDr] Issue with bounds
|
||||
impl<Number, Hash, DigestItem> Decode for Header<Number, Hash, DigestItem> where
|
||||
Number: Decode,
|
||||
Hash: HashT,
|
||||
|
||||
@@ -200,7 +200,7 @@ mod tests {
|
||||
|
||||
const DUMMY_FUNCTION: u64 = 0;
|
||||
const DUMMY_ACCOUNTID: u64 = 0;
|
||||
|
||||
|
||||
type Ex = UncheckedMortalExtrinsic<u64, u64, u64, TestSig>;
|
||||
type CEx = CheckedExtrinsic<u64, u64, u64>;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ pub trait BlockNumberToHash {
|
||||
type BlockNumber: Zero;
|
||||
|
||||
/// The type of the hash.
|
||||
type Hash;
|
||||
type Hash: Encode;
|
||||
|
||||
/// Get the hash for a given block number, or `None` if unknown.
|
||||
fn block_number_to_hash(&self, n: Self::BlockNumber) -> Option<Self::Hash>;
|
||||
|
||||
@@ -30,8 +30,14 @@ pub type TransactionTag = Vec<u8>;
|
||||
|
||||
/// Information on a transaction's validity and, if valid, on how it relates to other transactions.
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
pub enum TransactionValidity {
|
||||
Invalid,
|
||||
Valid(TransactionPriority, Vec<TransactionTag>, Vec<TransactionTag>, TransactionLongevity),
|
||||
Valid(
|
||||
/* priority: */TransactionPriority,
|
||||
/* requires: */Vec<TransactionTag>,
|
||||
/* provides: */Vec<TransactionTag>,
|
||||
/* longevity: */TransactionLongevity
|
||||
),
|
||||
Unknown,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user