core/types: add block location fields to receipt (#17662)
Solves #15210 without changing consensus, in a backwards compatible way, by adding tx inclusion information to the Receipt struct.
This commit is contained in:
@ -325,6 +325,9 @@ func ReadReceipts(db ethdb.Reader, hash common.Hash, number uint64) types.Receip
|
||||
logIndex += 1
|
||||
}
|
||||
receipts[i] = (*types.Receipt)(receipt)
|
||||
receipts[i].BlockHash = hash
|
||||
receipts[i].BlockNumber = big.NewInt(0).SetUint64(number)
|
||||
receipts[i].TransactionIndex = uint(i)
|
||||
}
|
||||
return receipts
|
||||
}
|
||||
|
Reference in New Issue
Block a user