If the transaction block is reorged, the previous block hash will be retrieved from the cache
|
_getReceipt = async (txHash: string): Promise<TransactionReceipt | null> => { |
|
const txFromCache = this.blockCache.getReceiptByHash(txHash); |
|
if ( |
|
txFromCache && |
|
await this._isBlockCanonical(txFromCache.blockHash, txFromCache.blockNumber) |
|
) { |
|
delete txFromCache.byzantium; |
|
return txFromCache; |
|
} |
|
|
|
const txFromSubql = await this.subql?.getTxReceiptByHash(txHash); |
|
return txFromSubql |
|
? subqlReceiptAdapter(txFromSubql) |
|
: null; |
|
}; |
If the transaction block is reorged, the previous block hash will be retrieved from the cache
bodhi.js/packages/eth-providers/src/base-provider.ts
Lines 1712 to 1726 in f2d786c