chain/ethereum: Check block cache before RPC in fetch_full_block_with_rpc
fetch_full_block_with_rpc previously called adapter.block_by_hash() directly, bypassing the block cache and always making an eth_getBlockByHash RPC call. It is called from ancestor_block when the cached block has no receipts, or after walking back the chain via parent_ptr (which populates the cache). In both cases the block may already be available in the cache. Change it to delegate the light block fetch to fetch_light_block_with_rpc, which goes through adapter.load_blocks() and chain_store.blocks() — checking recent_blocks_cache and the DB before falling back to RPC.
D
David Lutterkort committed
545cd70fe3b1c7d072f06aef9818ab64df993b3b
Parent: 411a14e