lnwallet: Extend Utxo struct with AddressType.

The Utxo struct now includes the address type and redeem/witness
scripts. This is necessary for accurate fee estimation.
This commit is contained in:
Jim Posen authored and Olaoluwa Osuntokun committed 2017-10-19 17:37:53 -07:00
1 parent 10a336db46
commit c94130328a
3 files changed
+29 -8

No files matched your search

+3 -1
View File
@@ -149,7 +149,9 @@ func (*mockWalletController) SendOutputs(outputs []*wire.TxOut) (*chainhash.Hash
// need one unspent for the funding transaction.
func (*mockWalletController) ListUnspentWitness(confirms int32) ([]*lnwallet.Utxo, error) {
utxo := &lnwallet.Utxo{
Value: btcutil.Amount(10 * btcutil.SatoshiPerBitcoin),
AddressType: lnwallet.WitnessPubKey,
Value: btcutil.Amount(10 * btcutil.SatoshiPerBitcoin),
PkScript: make([]byte, 22),
OutPoint: wire.OutPoint{
Hash: chainhash.Hash{},
Index: 0,