Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use returnTransactionObjects to get all transactions in a block #245

Open
vrde opened this issue Aug 10, 2019 · 0 comments
Open

Use returnTransactionObjects to get all transactions in a block #245

vrde opened this issue Aug 10, 2019 · 0 comments

Comments

@vrde
Copy link
Collaborator

vrde commented Aug 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant