Merge pull request #11152 from filecoin-project/steb/eth-gateway-filter-id-error

fix: gateway: return an error when an Eth filter is not found
This commit is contained in:
Aayush Rajasekaran 2023-08-09 17:25:03 -04:00 committed by GitHub
commit bcde3bd60e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ import (
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/events/filter"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
)
@ -427,7 +428,7 @@ func (gw *Node) EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID
ft.lk.Unlock()
if !ok {
return nil, nil
return nil, filter.ErrFilterNotFound
}
return gw.target.EthGetFilterChanges(ctx, id)