Minor build fixes.
This commit is contained in:
parent
08b9cc2c41
commit
76696e3b49
@ -315,7 +315,7 @@ impl<V> Client<V> where V: Verifier {
|
|||||||
if !imported_blocks.is_empty() && self.block_queue.queue_info().is_empty() {
|
if !imported_blocks.is_empty() && self.block_queue.queue_info().is_empty() {
|
||||||
let (enacted, retracted) = self.calculate_enacted_retracted(import_results);
|
let (enacted, retracted) = self.calculate_enacted_retracted(import_results);
|
||||||
io.send(NetworkIoMessage::User(SyncMessage::NewChainBlocks {
|
io.send(NetworkIoMessage::User(SyncMessage::NewChainBlocks {
|
||||||
good: imported_blocks,
|
imported: imported_blocks,
|
||||||
invalid: invalid_blocks,
|
invalid: invalid_blocks,
|
||||||
enacted: enacted,
|
enacted: enacted,
|
||||||
retracted: retracted,
|
retracted: retracted,
|
||||||
|
@ -83,10 +83,12 @@ impl TestBlockChainClient {
|
|||||||
client
|
client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set the balance of account `address` to `balance`.
|
||||||
pub fn set_balance(&mut self, address: Address, balance: U256) {
|
pub fn set_balance(&mut self, address: Address, balance: U256) {
|
||||||
self.balances.write().unwrap().insert(address, balance);
|
self.balances.write().unwrap().insert(address, balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set storage `position` to `value` for account `address`.
|
||||||
pub fn set_storage(&mut self, address: Address, position: H256, value: H256) {
|
pub fn set_storage(&mut self, address: Address, position: H256, value: H256) {
|
||||||
self.storage.write().unwrap().insert((address, position), value);
|
self.storage.write().unwrap().insert((address, position), value);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ impl MinerService for Miner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn chain_new_blocks(&self, chain: &BlockChainClient, imported: &[H256], invalid: &[H256], enacted: &[H256], _retracted: &[H256]) {
|
fn chain_new_blocks(&self, chain: &BlockChainClient, imported: &[H256], invalid: &[H256], enacted: &[H256], retracted: &[H256]) {
|
||||||
fn fetch_transactions(chain: &BlockChainClient, hash: &H256) -> Vec<SignedTransaction> {
|
fn fetch_transactions(chain: &BlockChainClient, hash: &H256) -> Vec<SignedTransaction> {
|
||||||
let block = chain
|
let block = chain
|
||||||
.block(BlockId::Hash(*hash))
|
.block(BlockId::Hash(*hash))
|
||||||
@ -165,9 +165,9 @@ impl MinerService for Miner {
|
|||||||
let in_chain = in_chain
|
let in_chain = in_chain
|
||||||
.par_iter()
|
.par_iter()
|
||||||
.flat_map(|h| h.par_iter().map(|h| fetch_transactions(chain, h)));
|
.flat_map(|h| h.par_iter().map(|h| fetch_transactions(chain, h)));
|
||||||
.map(|h| fetch_transactions(chain, h));
|
|
||||||
let out_of_chain = retracted
|
let out_of_chain = retracted
|
||||||
.par_iter()
|
.par_iter()
|
||||||
|
.map(|h| fetch_transactions(chain, h));
|
||||||
|
|
||||||
in_chain.for_each(|txs| {
|
in_chain.for_each(|txs| {
|
||||||
let mut transaction_queue = self.transaction_queue.lock().unwrap();
|
let mut transaction_queue = self.transaction_queue.lock().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user