Skip to content

Commit

Permalink
core: fix wrong blockHash for eth_getLogs (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan authored and wanwiset25 committed Nov 13, 2024
1 parent 83adfc2 commit 1120aff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/database_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1120aff

Please sign in to comment.