Update for geth version 1.10
- remove workaround for to low maxRequestContentLength - stop using obsolete eth_protocolVersion RPC callpull/576/head
parent
8f3106d009
commit
0ae8ba57a2
|
@ -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,
|
||||
}
|
||||
idi := int(id.Uint64())
|
||||
if idi == 1 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue