Fix formatting and linting issues

pull/187/head^2
Martin Boehm 2019-05-27 12:51:42 +02:00
parent 7f63acaaff
commit b33414cdba
6 changed files with 296 additions and 294 deletions

View File

@ -58,7 +58,7 @@ func (b *MonetaryUnitRPC) Initialize() error {
return nil
}
// Get Block
// GetBlock gets block from backend
func (b *MonetaryUnitRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) {
if height == 0 {
@ -91,6 +91,9 @@ func (b *MonetaryUnitRPC) GetBlock(hash string, height uint32) (*bchain.Block, e
req.Params.BlockHash = hash
req.Params.Verbosity = 1
err = b.Call(&req, &res)
if err != nil {
return nil, err
}
txs := make([]bchain.Tx, 0, len(res.Result.Txids))
for _, txid := range res.Result.Txids {

View File

@ -468,9 +468,8 @@ func (ab *AddrBalance) markUtxoAsSpent(btxID []byte, vout int32) {
// mark utxo as spent by setting vout=-1
utxo.Vout = -1
return
} else {
break
}
break
}
}
}

View File

@ -665,7 +665,7 @@ func TestRocksDB_Index_BitcoinType(t *testing.T) {
SentSat: *dbtestdata.SatB1T2A5,
BalanceSat: *dbtestdata.SatB2T3A5,
Utxos: []Utxo{
Utxo{
{
BtxID: hexToBytes(dbtestdata.TxidB2T3),
Vout: 0,
Height: 225494,