From 9cc9977f956860be84e7cffd281884ff570e14ce Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Mon, 21 Aug 2017 16:58:21 -0700 Subject: [PATCH] breacharbiter_test: modify test vectors to support new structs --- breacharbiter_test.go | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/breacharbiter_test.go b/breacharbiter_test.go index 6affbe14..c82ac2d1 100644 --- a/breacharbiter_test.go +++ b/breacharbiter_test.go @@ -173,24 +173,21 @@ var ( breachedOutputs = []breachedOutput{ { - amt: btcutil.Amount(1e7), - outpoint: breachOutPoints[0], - witnessType: lnwallet.CommitmentNoDelay, - twoStageClaim: true, + amt: btcutil.Amount(1e7), + outpoint: breachOutPoints[0], + witnessType: lnwallet.CommitmentNoDelay, }, { - amt: btcutil.Amount(2e9), - outpoint: breachOutPoints[1], - witnessType: lnwallet.CommitmentRevoke, - twoStageClaim: false, + amt: btcutil.Amount(2e9), + outpoint: breachOutPoints[1], + witnessType: lnwallet.CommitmentRevoke, }, { - amt: btcutil.Amount(3e4), - outpoint: breachOutPoints[2], - witnessType: lnwallet.CommitmentDelayOutput, - twoStageClaim: false, + amt: btcutil.Amount(3e4), + outpoint: breachOutPoints[2], + witnessType: lnwallet.CommitmentDelayOutput, }, } @@ -240,7 +237,7 @@ func init() { // channel point. for i := range retributions { retInfo := &retributions[i] - retInfo.remoteIdentity = *breachedOutputs[i].signDescriptor.PubKey + retInfo.remoteIdentity = breachedOutputs[i].signDesc.PubKey retributionMap[retInfo.chanPoint] = *retInfo } } @@ -320,7 +317,7 @@ func initBreachedOutputs() error { breachKeys[i]) } sd.PubKey = pubkey - bo.signDescriptor = *sd + bo.signDesc = sd } return nil @@ -395,7 +392,6 @@ func copyRetInfo(retInfo *retributionInfo) *retributionInfo { selfOutput: retInfo.selfOutput, revokedOutput: retInfo.revokedOutput, htlcOutputs: make([]*breachedOutput, nHtlcs), - doneChan: retInfo.doneChan, } for i, htlco := range retInfo.htlcOutputs { @@ -776,8 +772,8 @@ restartCheck: foundSet[ret.chanPoint] = struct{}{} } else { - return fmt.Errorf("unkwown retribution "+ - "retrieved from db: %v", ret) + return fmt.Errorf("unkwown retribution retrieved "+ + "from db: %v", ret) } return nil