mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Remove InherentsPool and introduce non-propagateable transactions. (#2695)
* Remove InherentsPool. * Introduce transactions that are not propagated over the network. * Bump spec version. * Use separate flag for propagation. * Fix tests.
This commit is contained in:
committed by
Gavin Wood
parent
8d378cb293
commit
25b9c12c20
@@ -129,7 +129,7 @@ impl<B: ChainApi> Pool<B> {
|
||||
}
|
||||
|
||||
match self.api.validate_transaction(at, xt.clone())? {
|
||||
TransactionValidity::Valid { priority, requires, provides, longevity } => {
|
||||
TransactionValidity::Valid { priority, requires, provides, longevity, propagate } => {
|
||||
Ok(base::Transaction {
|
||||
data: xt,
|
||||
bytes,
|
||||
@@ -137,6 +137,7 @@ impl<B: ChainApi> Pool<B> {
|
||||
priority,
|
||||
requires,
|
||||
provides,
|
||||
propagate,
|
||||
valid_till: block_number
|
||||
.saturated_into::<u64>()
|
||||
.saturating_add(longevity),
|
||||
@@ -491,6 +492,7 @@ mod tests {
|
||||
requires: if nonce > block_number { vec![vec![nonce as u8 - 1]] } else { vec![] },
|
||||
provides: vec![vec![nonce as u8]],
|
||||
longevity: 3,
|
||||
propagate: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user