From 8b28f627caebbc214363886b9e8f1315ea87f2ec Mon Sep 17 00:00:00 2001 From: debris Date: Mon, 15 Feb 2016 13:39:58 +0100 Subject: [PATCH] fixed order of eth_getLogs --- rpc/src/v1/impls/eth.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index 85afdd612..bbeb475dc 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -205,11 +205,14 @@ impl Eth for EthClient { let possibilities = filter.bloom_possibilities(); let from = filter.from_block.map_or_else(|| BlockId::Earliest, Into::into); let to = filter.to_block.map_or_else(|| BlockId::Latest, Into::into); - let blocks: HashSet = possibilities.iter() + let mut blocks: Vec = possibilities.iter() .map(|bloom| self.client.blocks_with_bloom(bloom, from.clone(), to.clone())) .filter_map(|m| m) .flat_map(|m| m) + .collect::>() + .into_iter() .collect(); + blocks.sort(); to_value(&blocks) }) }