Web3.swift icon indicating copy to clipboard operation
Web3.swift copied to clipboard

Fix 2/7 failing test cases by getting latest block

Open brettfazio opened this issue 4 years ago • 1 comments

A full-node running without archive mode will prune generated state to conserve disk space. This helps with the sync time of a node and greatly reduces storage and computation cost. Because of the way account and contract storage works in Ethereum, this means that only an archive node can serve API request for certain RPC methods older than 128 blocks. thus the reason for these cases failing before.

brettfazio avatar Feb 02 '21 15:02 brettfazio

I suppose the problem is accurately asserting the balance like here since the block number will be a different one every time.

But I do believe this new solution to be better as all the tests were failing before.

brettfazio avatar Feb 02 '21 15:02 brettfazio