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:
Tomasz Drwięga
2019-05-29 16:06:49 +02:00
committed by Gavin Wood
parent 8d378cb293
commit 25b9c12c20
22 changed files with 250 additions and 171 deletions
@@ -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,
})
}
}