From 6f9ba620a82f3a1d734c52c126c6db0f3215f84f Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 15 Dec 2015 15:23:56 -0600 Subject: [PATCH] grab the full script instead of just the hash for the change addr --- wallet/wallet.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wallet/wallet.go b/wallet/wallet.go index 36b784b3..d672e106 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -381,8 +381,15 @@ func (l *LightningWallet) handleFundingReserveRequest(req *initFundingReserveMsg req.resp <- nil return } - changeAddrScript := addrs[0].AddrHash() - // TODO(roasbeef): re-enable after test are connected to real node. + changeAddrScript, err := txscript.PayToAddrScript(addrs[0].Address()) + if err != nil { + req.err <- err + req.resp <- nil + return + } + // TODO(roasbeef): re-enable after tests are connected to real node. + // * or the change to btcwallet is made to reverse the dependancy + // between chain-client and wallet. //changeAddr, err := l.wallet.NewChangeAddress(waddrmgr.DefaultAccountNum) partialState.ourChange = append(partialState.ourChange,