Disable bcash unsupported EstimateSmartFee

pull/133/head
Martin Boehm 2019-03-04 11:26:12 +01:00
parent 1540dc940d
commit 3f7ac68865
1 changed files with 0 additions and 25 deletions

View File

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