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
2017-10-02 18:52:45 -07:00
committed by Olaoluwa Osuntokun
parent 10a336db46
commit c94130328a
3 changed files with 29 additions and 8 deletions

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,