fix: gateway: return an error when an Eth filter is not found

Previously, we'd just return nothing.
This commit is contained in:
Steven Allen 2023-08-09 12:12:30 -07:00
parent 9310cd6036
commit a626b3e62c

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)