Fix propagation in network (#5395)

* fix propagation in network

* Update client/service/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* fix suggestion

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Nikolay Volf
2020-03-25 05:03:58 -07:00
committed by GitHub
parent e61ca13cb1
commit e85d7a4ba7
+5 -1
View File
@@ -648,7 +648,11 @@ where
}
fn transaction(&self, hash: &H) -> Option<B::Extrinsic> {
self.pool.ready_transaction(hash).map(|tx| tx.data().clone())
self.pool.ready_transaction(hash)
.and_then(
// Only propagable transactions should be resolved for network service.
|tx| if tx.is_propagable() { Some(tx.data().clone()) } else { None }
)
}
}