lnwallet: update GetUtxo to accept the pkScript to comply with new gcs filter

This commit is contained in:
Olaoluwa Osuntokun 2018-07-17 19:20:52 -07:00
parent 21451bf251
commit f9f9eefab4
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
2 changed files with 5 additions and 3 deletions

@ -237,10 +237,12 @@ type BlockChainIO interface {
// GetUtxo attempts to return the passed outpoint if it's still a // GetUtxo attempts to return the passed outpoint if it's still a
// member of the utxo set. The passed height hint should be the "birth // member of the utxo set. The passed height hint should be the "birth
// height" of the passed outpoint. In the case that the output is in // height" of the passed outpoint. The script passed should be the
// script that the oupoint creates. In the case that the output is in
// the UTXO set, then the output corresponding to that output is // the UTXO set, then the output corresponding to that output is
// returned. Otherwise, a non-nil error will be returned. // returned. Otherwise, a non-nil error will be returned.
GetUtxo(op *wire.OutPoint, heightHint uint32) (*wire.TxOut, error) GetUtxo(op *wire.OutPoint, pkScript []byte,
heightHint uint32) (*wire.TxOut, error)
// GetBlockHash returns the hash of the block in the best blockchain // GetBlockHash returns the hash of the block in the best blockchain
// at the given height. // at the given height.

@ -8,12 +8,12 @@ import (
"testing" "testing"
"time" "time"
"github.com/lightningnetwork/lnd/keychain"
"github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/keychain"
) )
// TestCommitmentSpendValidation test the spendability of both outputs within // TestCommitmentSpendValidation test the spendability of both outputs within