From fa8430fa73f0f9a609ff1d9881313979fb3ac73e Mon Sep 17 00:00:00 2001 From: zhangkai Date: Mon, 12 Aug 2024 11:04:37 +0800 Subject: [PATCH] fix getfilterchanges return value --- jsonrpc/endpoints_eth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonrpc/endpoints_eth.go b/jsonrpc/endpoints_eth.go index bcfb21e770..543e5aa5d2 100644 --- a/jsonrpc/endpoints_eth.go +++ b/jsonrpc/endpoints_eth.go @@ -434,7 +434,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err return nil, rpcErr } if len(res) == 0 { - return nil, nil + return []common.Hash{}, nil } return res, nil } @@ -449,7 +449,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err return nil, rpcErr } if len(res) == 0 { - return nil, nil + return common.Hash{}, nil } return res, nil } @@ -472,7 +472,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err } res := resInterface.([]types.Log) if len(res) == 0 { - return nil, nil + return []types.Log{}, nil } return res, nil }