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:
@ -121,6 +121,9 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
|
||||
// Set the receipt logs and create a bloom for filtering
|
||||
receipt.Logs = statedb.GetLogs(tx.Hash())
|
||||
receipt.Bloom = types.CreateBloom(types.Receipts{receipt})
|
||||
receipt.BlockHash = statedb.BlockHash()
|
||||
receipt.BlockNumber = header.Number
|
||||
receipt.TransactionIndex = uint(statedb.TxIndex())
|
||||
|
||||
return receipt, gas, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user