Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix debug_getBadBlocks panic due to no receipt (#272)
The code previously assumed that all non pending transactions passed to newRPCTransaction would have a receipt, but in fact this is not the case because recorded bad blocks have no receipts. The only transaction type that relied on having a receipt is the CeloDynamicFeeTxV2Type which post cel2 stores the base fee in fee currency in the receipt which allows for calculating the gas price without state access. So we fix the panic by simply allowing post cel2 CeloDynamicFeeTxV2Type to not have a receipt, and if they don't returning nil for the gas price. Closes celo-org/celo-blockchain-planning#747
- Loading branch information