Update for geth version 1.10

- remove workaround for to low maxRequestContentLength
- stop using obsolete eth_protocolVersion RPC call
pull/576/head
Martin Boehm 2021-03-09 11:37:35 +01:00
parent 8f3106d009
commit 0ae8ba57a2
2 changed files with 5 additions and 10 deletions

View File

@ -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 {

View File

@ -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