From 3f7ac688655b5d735fae33f5b28a10b99b3b31f5 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Mon, 4 Mar 2019 11:26:12 +0100 Subject: [PATCH] Disable bcash unsupported EstimateSmartFee --- bchain/coins/bch/bcashrpc.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/bchain/coins/bch/bcashrpc.go b/bchain/coins/bch/bcashrpc.go index fbd1ab10..9a3c7d4b 100644 --- a/bchain/coins/bch/bcashrpc.go +++ b/bchain/coins/bch/bcashrpc.go @@ -5,7 +5,6 @@ import ( "blockbook/bchain/coins/btc" "encoding/hex" "encoding/json" - "math/big" "github.com/golang/glog" "github.com/juju/errors" @@ -158,30 +157,6 @@ func (b *BCashRPC) GetBlockFull(hash string) (*bchain.Block, error) { return nil, errors.New("Not implemented") } -// EstimateSmartFee returns fee estimation. -func (b *BCashRPC) EstimateSmartFee(blocks int, conservative bool) (big.Int, error) { - glog.V(1).Info("rpc: estimatesmartfee ", blocks) - - res := btc.ResEstimateSmartFee{} - req := cmdEstimateSmartFee{Method: "estimatesmartfee"} - req.Params.Blocks = blocks - // conservative param is omitted - err := b.Call(&req, &res) - - var r big.Int - if err != nil { - return r, err - } - if res.Error != nil { - return r, res.Error - } - r, err = b.Parser.AmountToBigInt(res.Result.Feerate) - if err != nil { - return r, err - } - return r, nil -} - func isErrBlockNotFound(err *bchain.RPCError) bool { return err.Message == "Block not found" || err.Message == "Block height out of range"