fixed order of eth_getLogs
This commit is contained in:
parent
fada9bb1ba
commit
8b28f627ca
@ -205,11 +205,14 @@ impl Eth for EthClient {
|
|||||||
let possibilities = filter.bloom_possibilities();
|
let possibilities = filter.bloom_possibilities();
|
||||||
let from = filter.from_block.map_or_else(|| BlockId::Earliest, Into::into);
|
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 to = filter.to_block.map_or_else(|| BlockId::Latest, Into::into);
|
||||||
let blocks: HashSet<u64> = possibilities.iter()
|
let mut blocks: Vec<u64> = possibilities.iter()
|
||||||
.map(|bloom| self.client.blocks_with_bloom(bloom, from.clone(), to.clone()))
|
.map(|bloom| self.client.blocks_with_bloom(bloom, from.clone(), to.clone()))
|
||||||
.filter_map(|m| m)
|
.filter_map(|m| m)
|
||||||
.flat_map(|m| m)
|
.flat_map(|m| m)
|
||||||
|
.collect::<HashSet<u64>>()
|
||||||
|
.into_iter()
|
||||||
.collect();
|
.collect();
|
||||||
|
blocks.sort();
|
||||||
to_value(&blocks)
|
to_value(&blocks)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user