Merge branch 'block_header_rpc' into on-demand-priority

This commit is contained in:
Robert Habermeier
2017-04-06 17:59:55 +02:00
47 changed files with 960 additions and 367 deletions

View File

@@ -67,7 +67,7 @@ impl IoHandler<ClientIoMessage> for QueueCull {
let (sync, on_demand, txq) = (self.sync.clone(), self.on_demand.clone(), self.txq.clone());
let best_header = self.client.best_block_header();
let start_nonce = self.client.engine().account_start_nonce;
let start_nonce = self.client.engine().account_start_nonce();
info!(target: "cull", "Attempting to cull queued transactions from {} senders.", senders.len());
self.remote.spawn_with_timeout(move || {
@@ -77,7 +77,7 @@ impl IoHandler<ClientIoMessage> for QueueCull {
.map(|&address| request::Account { header: best_header.clone(), address: address })
.map(move |request| {
on_demand.account(ctx, request)
.map(move |maybe_acc| maybe_acc.map_or(start_nonce, |acc.nonce|))
.map(move |maybe_acc| maybe_acc.map_or(start_nonce, |acc| acc.nonce))
})
.zip(senders.iter())
.map(|(fut, &addr)| fut.map(move |nonce| (addr, nonce)));