Fix formatting and linting errors
parent
f0ccab3e01
commit
aceadbb10c
|
@ -80,4 +80,3 @@ func (p *BitcoreParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([
|
|||
func (p *BitcoreParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error) {
|
||||
return p.baseparser.UnpackTx(buf)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import (
|
|||
"blockbook/bchain"
|
||||
"blockbook/bchain/coins/btc"
|
||||
"encoding/hex"
|
||||
"github.com/martinboehm/btcutil/chaincfg"
|
||||
"math/big"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
"github.com/martinboehm/btcutil/chaincfg"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
@ -77,7 +77,6 @@ func Test_GetAddrDescFromAddress_Mainnet(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
var (
|
||||
testTx1 bchain.Tx
|
||||
|
||||
|
@ -207,4 +206,3 @@ func Test_UnpackTx(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"blockbook/bchain"
|
||||
"blockbook/bchain/coins/btc"
|
||||
"encoding/json"
|
||||
"github.com/juju/errors"
|
||||
"github.com/golang/glog"
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
|
||||
// BitcoreRPC is an interface to JSON-RPC bitcoind service.
|
||||
|
@ -56,7 +56,6 @@ func (b *BitcoreRPC) Initialize() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
// GetBlock returns block with given hash.
|
||||
|
||||
func (f *BitcoreRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) {
|
||||
|
@ -90,7 +89,7 @@ func (f *BitcoreRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
|
|||
return block, nil
|
||||
}
|
||||
|
||||
// GetBlockFull returns block with given hash
|
||||
// GetBlockFull returns block with given hash
|
||||
func (f *BitcoreRPC) GetBlockFull(hash string) (*bchain.Block, error) {
|
||||
glog.V(1).Info("rpc: getblock (verbosity=2) ", hash)
|
||||
|
||||
|
@ -126,9 +125,8 @@ func (f *BitcoreRPC) GetBlockFull(hash string) (*bchain.Block, error) {
|
|||
return &res.Result, nil
|
||||
}
|
||||
|
||||
// GetTransactionForMempool returns a transaction by the transaction ID.
|
||||
// GetTransactionForMempool returns a transaction by the transaction ID.
|
||||
// It could be optimized for mempool, i.e. without block time and confirmations
|
||||
func (f *BitcoreRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error) {
|
||||
return f.GetTransaction(txid)
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ func (rd *RatesDownloader) findEarliestMarketData() (*time.Time, error) {
|
|||
// syncLatest downloads the latest FiatRates data every rd.PeriodSeconds
|
||||
func (rd *RatesDownloader) syncLatest() error {
|
||||
timer := time.NewTimer(rd.periodSeconds)
|
||||
var lastTickerRates map[string]float64 = nil
|
||||
var lastTickerRates map[string]float64
|
||||
sameTickerCounter := 0
|
||||
for {
|
||||
ticker, err := rd.downloader.getTicker(nil)
|
||||
|
|
Loading…
Reference in New Issue