You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eth.getBlock().transactions should either return empty array in case of empty block, or include undefined as part of its return type.
Actual behavior
import{Web3}from"web3";constweb3=newWeb3('https://sepolia.infura.io/v3/xxxxxx');constblock=awaitweb3.eth.getBlock(6058307,true);console.log(block.transactions);// this is undefined!
Steps to reproduce the behavior
use web3.eth.getBlock on an empty block.
Logs
Doesn't matter.
Environment
Doesn't matter.
The text was updated successfully, but these errors were encountered:
Expected behavior
The
eth.getBlock().transactions
should either return empty array in case of empty block, or includeundefined
as part of its return type.Actual behavior
Steps to reproduce the behavior
web3.eth.getBlock
on an empty block.Logs
Doesn't matter.
Environment
Doesn't matter.
The text was updated successfully, but these errors were encountered: