From 983c6e9db577710f0c05931e37a3c0d559eedf98 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Wed, 14 Nov 2018 19:33:57 +0100 Subject: [PATCH] Fix error handling in GetAddressUtxo --- api/worker.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/worker.go b/api/worker.go index 006978a6..1a350ddc 100644 --- a/api/worker.go +++ b/api/worker.go @@ -529,10 +529,16 @@ func (w *Worker) GetAddressUtxo(address string) ([]AddressUtxo, error) { } return nil }) + if err != nil { + return nil, err + } var lastTxid string var ta *db.TxAddresses total := ba.BalanceSat b, _, err := w.db.GetBestBlock() + if err != nil { + return nil, err + } bestheight := int(b) for i := len(txids) - 1; i >= 0 && total.Int64() > 0; i-- { o := txids[i]