Skip to content

Use returnTransactionObjects to get all transactions in a block #245

@vrde

Description

@vrde

I noticed those lines of codes in parseBlocks:

let block = await web3.eth.getBlock(parseBlock)
let updatedTxs = false
if(block){
let transactions = block.transactions
//console.log("transactions",transactions)
for(let t in transactions){
//console.log("TX",transactions[t])
let tx = await web3.eth.getTransaction(transactions[t])

web3.eth.getBlock allows to retrieve all transaction objects by enabling the optional parameter returnTransactionObjects

This would allow the burner wallet to make a single http request per block, instead of one http request per transaction. I understand that right now the number of transactions per block is not huge, but still querying for all transactions at once should be the preferred approach.

Note: I can make a bounty out of this, just asking for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions