Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vivienbcr committed Nov 23, 2023
2 parents cdd6c1d + d6c171a commit 2c64c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/endpoints/ethereum_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl EthereumNode {
let req = match block_numbers {
Some(block_numbers) => {
let mut batch = Vec::new();
let mut id = 1;
block_numbers.iter().for_each(|block_number| {
let body = JsonRpcReq {
jsonrpc: JSON_RPC_VER.to_string(),
Expand All @@ -102,8 +103,9 @@ impl EthereumNode {
JsonRpcParams::String(format!("0x{:x}", block_number)),
JsonRpcParams::Bool(txs),
],
id: 1,
id: id,
};
id += 1;
batch.push(body);
});
JsonRpcReqBody::Batch(batch)
Expand Down

0 comments on commit 2c64c94

Please sign in to comment.