Merge pull request #3182 from yaslama/addressTypeInitialization

Initialize addressType to UnknownAddressType
This commit is contained in:
Johan T. Halseth 2019-06-14 10:32:01 +02:00 committed by GitHub
commit f63c5d0170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,7 +378,7 @@ func (b *BtcWallet) ListUnspentWitness(minConfs, maxConfs int32) (
return nil, err
}
var addressType lnwallet.AddressType
addressType := lnwallet.UnknownAddressType
if txscript.IsPayToWitnessPubKeyHash(pkScript) {
addressType = lnwallet.WitnessPubKey
} else if txscript.IsPayToScriptHash(pkScript) {