From 0ae8ba57a2d763c21c017eb17f0ef62d32e25c0f Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Tue, 9 Mar 2021 11:37:35 +0100 Subject: [PATCH] Update for geth version 1.10 - remove workaround for to low maxRequestContentLength - stop using obsolete eth_protocolVersion RPC call --- bchain/coins/eth/ethrpc.go | 14 +++++--------- build/docker/bin/Makefile | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index 91101b33..551c650c 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -340,19 +340,15 @@ func (b *EthereumRPC) GetChainInfo() (*bchain.ChainInfo, error) { if err != nil { return nil, err } - var ver, protocol string + var ver string if err := b.rpc.CallContext(ctx, &ver, "web3_clientVersion"); err != nil { return nil, err } - if err := b.rpc.CallContext(ctx, &protocol, "eth_protocolVersion"); err != nil { - return nil, err - } rv := &bchain.ChainInfo{ - Blocks: int(h.Number.Int64()), - Bestblockhash: h.Hash().Hex(), - Difficulty: h.Difficulty.String(), - Version: ver, - ProtocolVersion: protocol, + Blocks: int(h.Number.Int64()), + Bestblockhash: h.Hash().Hex(), + Difficulty: h.Difficulty.String(), + Version: ver, } idi := int(id.Uint64()) if idi == 1 { diff --git a/build/docker/bin/Makefile b/build/docker/bin/Makefile index 3db4f032..738ef070 100644 --- a/build/docker/bin/Makefile +++ b/build/docker/bin/Makefile @@ -38,7 +38,6 @@ prepare-sources: mkdir -p $(BLOCKBOOK_BASE) cp -r /src $(BLOCKBOOK_SRC) cd $(BLOCKBOOK_SRC) && go mod download - sed -i 's/maxRequestContentLength\ =\ 1024\ \*\ 1024\ \*\ 5/maxRequestContentLength = 1024 * 1024 * 20/g' $(GOPATH)/pkg/mod/github.com/ethereum/go-ethereum*/rpc/http.go generate-data: cd $(BLOCKBOOK_SRC) && packr clean && packr