Fix formatting and linting issues
This commit is contained in:
parent
7f63acaaff
commit
b33414cdba
@ -58,7 +58,7 @@ func (b *MonetaryUnitRPC) Initialize() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Block
|
// GetBlock gets block from backend
|
||||||
func (b *MonetaryUnitRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) {
|
func (b *MonetaryUnitRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) {
|
||||||
|
|
||||||
if height == 0 {
|
if height == 0 {
|
||||||
@ -91,6 +91,9 @@ func (b *MonetaryUnitRPC) GetBlock(hash string, height uint32) (*bchain.Block, e
|
|||||||
req.Params.BlockHash = hash
|
req.Params.BlockHash = hash
|
||||||
req.Params.Verbosity = 1
|
req.Params.Verbosity = 1
|
||||||
err = b.Call(&req, &res)
|
err = b.Call(&req, &res)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
txs := make([]bchain.Tx, 0, len(res.Result.Txids))
|
txs := make([]bchain.Tx, 0, len(res.Result.Txids))
|
||||||
for _, txid := range res.Result.Txids {
|
for _, txid := range res.Result.Txids {
|
||||||
|
|||||||
@ -468,9 +468,8 @@ func (ab *AddrBalance) markUtxoAsSpent(btxID []byte, vout int32) {
|
|||||||
// mark utxo as spent by setting vout=-1
|
// mark utxo as spent by setting vout=-1
|
||||||
utxo.Vout = -1
|
utxo.Vout = -1
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -665,7 +665,7 @@ func TestRocksDB_Index_BitcoinType(t *testing.T) {
|
|||||||
SentSat: *dbtestdata.SatB1T2A5,
|
SentSat: *dbtestdata.SatB1T2A5,
|
||||||
BalanceSat: *dbtestdata.SatB2T3A5,
|
BalanceSat: *dbtestdata.SatB2T3A5,
|
||||||
Utxos: []Utxo{
|
Utxos: []Utxo{
|
||||||
Utxo{
|
{
|
||||||
BtxID: hexToBytes(dbtestdata.TxidB2T3),
|
BtxID: hexToBytes(dbtestdata.TxidB2T3),
|
||||||
Vout: 0,
|
Vout: 0,
|
||||||
Height: 225494,
|
Height: 225494,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user