rpc: make NewWitnessAddress return np2wkh addresses

This commit modifies NewWitnessAddress to return nested p2wkh address.
We do this as this RPC call was put in place to be used within GUI’s to
allow users to deposit funds into their LN wallet. By using nested
p2wkh, we ensure that the generate address that can be used to directly
create channels.
This commit is contained in:
Olaoluwa Osuntokun 2017-08-22 00:23:24 -07:00
parent d49172aa50
commit 6ad803b99c
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -245,7 +245,9 @@ func (r *rpcServer) NewWitnessAddress(ctx context.Context,
}
}
addr, err := r.server.cc.wallet.NewAddress(lnwallet.WitnessPubKey, false)
addr, err := r.server.cc.wallet.NewAddress(
lnwallet.NestedWitnessPubKey, false,
)
if err != nil {
return nil, err
}