Skip to content

Commit 156650f

Browse files
committed
lnd: add more context to address decode error
1 parent f42a651 commit 156650f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lnd/hdkeychain.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ func DecodeAddressHash(addr string, chainParams *chaincfg.Params) ([]byte, bool,
173173
// First parse address to get targetHash from it later.
174174
targetAddr, err := btcutil.DecodeAddress(addr, chainParams)
175175
if err != nil {
176-
return nil, false, err
176+
return nil, false, fmt.Errorf("unable to decode address %s: %v",
177+
addr, err)
177178
}
178179

179180
// Make the check on the decoded address according to the active

0 commit comments

Comments
 (0)