Closed
Description
When querying logs in a pruned node:
> eth.getLogs({ fromBlock: '0x0', toBlock: 'latest' })
Error: failed to get logs for block #0 (0xd4e567..cb8fa3)
at web3.js:6386:9(39)
at send (web3.js:5115:62(29))
at <eval>:1:12(7)
> eth.getLogs({ fromBlock: '0x1', toBlock: 'latest' })
Error: pruned history unavailable
at web3.js:6386:9(39)
at send (web3.js:5115:62(29))
at <eval>:1:12(7)
It means getLogs somehow sees block 0 as special and doesn't do the pruned history check properly on it. I guess it was because 0 was the special block number for the "earliest" tag.