peer: decorate delivery addr w/ internal key

In this commit, we move to add the internal key to the delivery addr. This way, we give the aux chan closer the extra information it may need to properly augment the normal co-op close process.
This commit is contained in:
Olaoluwa Osuntokun
2024-05-29 19:57:47 +02:00
committed by Oliver Gugger
parent 44ab7e6b10
commit 8dee76a1b8
4 changed files with 131 additions and 17 deletions

View File

@@ -78,9 +78,8 @@ func (w *WalletController) ConfirmedBalance(int32, string) (btcutil.Amount,
func (w *WalletController) NewAddress(lnwallet.AddressType, bool,
string) (btcutil.Address, error) {
addr, _ := btcutil.NewAddressPubKey(
w.RootKey.PubKey().SerializeCompressed(), &chaincfg.MainNetParams,
)
pkh := btcutil.Hash160(w.RootKey.PubKey().SerializeCompressed())
addr, _ := btcutil.NewAddressPubKeyHash(pkh, &chaincfg.MainNetParams)
return addr, nil
}