mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
core: fix blockHash for eth_getLogs, eth_getFilterLogs, eth_getTransactionReceipt (#208)
This commit is contained in:
parent
f6b50b84cd
commit
02158d06d9
1 changed files with 5 additions and 1 deletions
|
|
@ -22,10 +22,10 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/types"
|
"github.com/XinFinOrg/XDPoSChain/core/types"
|
||||||
"github.com/XinFinOrg/XDPoSChain/ethdb"
|
"github.com/XinFinOrg/XDPoSChain/ethdb"
|
||||||
"github.com/XinFinOrg/XDPoSChain/log"
|
"github.com/XinFinOrg/XDPoSChain/log"
|
||||||
|
|
@ -259,6 +259,10 @@ func GetBlockReceipts(db DatabaseReader, hash common.Hash, number uint64) types.
|
||||||
receipts := make(types.Receipts, len(storageReceipts))
|
receipts := make(types.Receipts, len(storageReceipts))
|
||||||
for i, receipt := range storageReceipts {
|
for i, receipt := range storageReceipts {
|
||||||
receipts[i] = (*types.Receipt)(receipt)
|
receipts[i] = (*types.Receipt)(receipt)
|
||||||
|
for _, log := range receipts[i].Logs {
|
||||||
|
// update BlockHash to fix #208
|
||||||
|
log.BlockHash = hash
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return receipts
|
return receipts
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue