Merge pull request #675 from gzliudan/fix-issue-650

return right blockHash for eth_getLogs (#650)
This commit is contained in:
Daniel Liu 2024-10-16 13:51:30 +08:00 committed by GitHub
commit 8cf0076851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -262,6 +262,10 @@ func GetBlockReceipts(db DatabaseReader, hash common.Hash, number uint64) types.
receipts[i].BlockHash = hash
receipts[i].BlockNumber = big.NewInt(0).SetUint64(number)
receipts[i].TransactionIndex = uint(i)
for _, log := range receipts[i].Logs {
// set BlockHash to fix #650
log.BlockHash = hash
}
}
return receipts
}