From e9134b04909b2e47eea081252cd4da6b6769d414 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Wed, 15 Mar 2023 23:16:06 +0100 Subject: [PATCH] Handle "null" returned from geth when block not found --- bchain/coins/eth/ethrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index 61173b05..0ff995d8 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -545,7 +545,7 @@ func (b *EthereumRPC) getBlockRaw(hash string, height uint32, fullTxs bool) (jso } if err != nil { return nil, errors.Annotatef(err, "hash %v, height %v", hash, height) - } else if len(raw) == 0 { + } else if len(raw) == 0 || (len(raw) == 4 && string(raw) == "null") { return nil, bchain.ErrBlockNotFound } return raw, nil