Update to latest substrate master (#853)

* try to update

* latest updates

* final fixes

* Fix claim w/ vesting logic

* Make claim tests a bit better

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Nikolay Volf
2020-02-19 20:24:57 +03:00
committed by GitHub
parent bbb2fbc556
commit f7303348ff
31 changed files with 837 additions and 647 deletions
+9 -1
View File
@@ -283,11 +283,19 @@ pub fn register_validator<C: ChainContext + 'static, S: NetworkSpecialization<Bl
let gossip_side = validator.clone();
let gossip_engine = sc_network_gossip::GossipEngine::new(
service.clone(),
executor,
POLKADOT_ENGINE_ID,
gossip_side,
);
// Ideally this would not be spawned as an orphaned task, but polled by
// `RegisteredMessageValidator` which in turn would be polled by a `ValidationNetwork`.
let spawn_res = executor.spawn_obj(futures::task::FutureObj::from(Box::new(gossip_engine.clone())));
// Note: we consider the chances of an error to spawn a background task almost null.
if spawn_res.is_err() {
log::error!(target: "polkadot-gossip", "Failed to spawn background task");
}
RegisteredMessageValidator {
inner: validator as _,
service: Some(service),