From 19bc477b9ab14ca349e60faf18865f8197a42cc3 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 24 Feb 2018 19:12:16 -0800 Subject: [PATCH] lnwallet: update interface tests to account for recent lnwire.MilliSatoshi change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lnwire.MilliSatoshi is now a signed integer, as a result, we’ll return a different error if our balances go to negative due to the inability to pay a the set fee. --- lnwallet/transactions_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lnwallet/transactions_test.go b/lnwallet/transactions_test.go index 47ee6d81d..3be7a404f 100644 --- a/lnwallet/transactions_test.go +++ b/lnwallet/transactions_test.go @@ -6,6 +6,7 @@ import ( "fmt" "testing" + "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnwire" @@ -806,8 +807,9 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) { dustLimit: tc.dustLimit, isOurs: true, } - err = channel.createCommitmentTx(commitmentView, theHTLCView, - keys) + err = channel.createCommitmentTx( + commitmentView, theHTLCView, keys, + ) if err != nil { t.Errorf("Case %d: Failed to create new commitment tx: %v", i, err) continue @@ -836,8 +838,8 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) { // Check that commitment transaction was created correctly. if commitTx.WitnessHash() != *expectedCommitmentTx.WitnessHash() { t.Errorf("Case %d: Generated unexpected commitment tx: "+ - "expected %s, got %s", i, expectedCommitmentTx.WitnessHash(), - commitTx.WitnessHash()) + "expected %s, got %s", i, spew.Sdump(expectedCommitmentTx), + spew.Sdump(commitTx)) continue }