chg: no need for txhash

This commit is contained in:
Jaynti Kanani 2020-10-17 19:19:05 +05:30
parent 0f74eca8c6
commit d3fe97ad4e
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E

View file

@ -5,7 +5,6 @@ import (
"math/big"
"github.com/maticnetwork/bor/common"
"github.com/maticnetwork/bor/crypto"
"github.com/maticnetwork/bor/rlp"
)
@ -96,13 +95,13 @@ func decodeStoredBorReceiptRLP(r *BorReceiptForStorage, blob []byte) error {
// DeriveFields fills the receipts with their computed fields based on consensus
// data and contextual infos like containing block and transactions.
func (r *BorReceipt) DeriveFields(hash common.Hash, number uint64) error {
txHash := common.BytesToHash(crypto.Keccak256(append([]byte("matic-receipt-"), hash.Bytes()...)))
// txHash := common.BytesToHash(crypto.Keccak256(append([]byte("bor-receipt-"), hash.Bytes()...)))
// The derived log fields can simply be set from the block and transaction
for j := 0; j < len(r.Logs); j++ {
r.Logs[j].BlockNumber = number
r.Logs[j].BlockHash = hash
r.Logs[j].TxHash = txHash
// r.Logs[j].TxHash = txHash
r.Logs[j].TxIndex = uint(0)
r.Logs[j].Index = uint(j)
}