mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
eth/filters: fix blockHash in eth_getfilterchanges (#208)
This commit is contained in:
parent
02158d06d9
commit
9e860e4c3f
1 changed files with 5 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
ethereum "github.com/XinFinOrg/XDPoSChain"
|
||||
"github.com/XinFinOrg/XDPoSChain/common"
|
||||
"github.com/XinFinOrg/XDPoSChain/common/hexutil"
|
||||
"github.com/XinFinOrg/XDPoSChain/core"
|
||||
"github.com/XinFinOrg/XDPoSChain/core/types"
|
||||
"github.com/XinFinOrg/XDPoSChain/ethdb"
|
||||
"github.com/XinFinOrg/XDPoSChain/event"
|
||||
|
|
@ -418,6 +419,10 @@ func (api *PublicFilterAPI) GetFilterChanges(id rpc.ID) (interface{}, error) {
|
|||
case LogsSubscription:
|
||||
logs := f.logs
|
||||
f.logs = nil
|
||||
for _, log := range logs {
|
||||
// update BlockHash to fix #208
|
||||
log.BlockHash = core.GetCanonicalHash(api.chainDb, log.BlockNumber)
|
||||
}
|
||||
return returnLogs(logs), nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue