@@ -1010,13 +1010,13 @@ func initBreachedState(t *testing.T) (*BreachArbitrator,
10101010func TestBreachHandoffSuccess (t * testing.T ) {
10111011 brar , alice , _ , bobClose , contractBreaches := initBreachedState (t )
10121012
1013- chanPoint := alice .ChanPoint
1013+ chanPoint := alice .ChannelPoint ()
10141014
10151015 // Signal a spend of the funding transaction and wait for the close
10161016 // observer to exit.
10171017 processACK := make (chan error )
10181018 breach := & ContractBreachEvent {
1019- ChanPoint : * chanPoint ,
1019+ ChanPoint : chanPoint ,
10201020 ProcessACK : func (brarErr error ) {
10211021 processACK <- brarErr
10221022 },
@@ -1044,13 +1044,13 @@ func TestBreachHandoffSuccess(t *testing.T) {
10441044 // After exiting, the breach arbiter should have persisted the
10451045 // retribution information and the channel should be shown as pending
10461046 // force closed.
1047- assertArbiterBreach (t , brar , chanPoint )
1047+ assertArbiterBreach (t , brar , & chanPoint )
10481048
10491049 // Send another breach event. Since the handoff for this channel was
10501050 // already ACKed, the breach arbiter should immediately ACK and ignore
10511051 // this event.
10521052 breach = & ContractBreachEvent {
1053- ChanPoint : * chanPoint ,
1053+ ChanPoint : chanPoint ,
10541054 ProcessACK : func (brarErr error ) {
10551055 processACK <- brarErr
10561056 },
@@ -1077,7 +1077,7 @@ func TestBreachHandoffSuccess(t *testing.T) {
10771077 }
10781078
10791079 // State should not have changed.
1080- assertArbiterBreach (t , brar , chanPoint )
1080+ assertArbiterBreach (t , brar , & chanPoint )
10811081}
10821082
10831083// TestBreachHandoffFail tests that a channel's close observer properly
@@ -1096,10 +1096,10 @@ func TestBreachHandoffFail(t *testing.T) {
10961096
10971097 // Signal the notifier to dispatch spend notifications of the funding
10981098 // transaction using the transaction from bob's closing summary.
1099- chanPoint := alice .ChanPoint
1099+ chanPoint := alice .ChannelPoint ()
11001100 processACK := make (chan error )
11011101 breach := & ContractBreachEvent {
1102- ChanPoint : * chanPoint ,
1102+ ChanPoint : chanPoint ,
11031103 ProcessACK : func (brarErr error ) {
11041104 processACK <- brarErr
11051105 },
@@ -1127,7 +1127,7 @@ func TestBreachHandoffFail(t *testing.T) {
11271127 // Since the handoff failed, the breach arbiter should not show the
11281128 // channel as breached, and the channel should also not have been marked
11291129 // pending closed.
1130- assertNoArbiterBreach (t , brar , chanPoint )
1130+ assertNoArbiterBreach (t , brar , & chanPoint )
11311131 assertNotPendingClosed (t , alice )
11321132
11331133 brar , err := createTestArbiter (
@@ -1138,7 +1138,7 @@ func TestBreachHandoffFail(t *testing.T) {
11381138 // Signal a spend of the funding transaction and wait for the close
11391139 // observer to exit. This time we are allowing the handoff to succeed.
11401140 breach = & ContractBreachEvent {
1141- ChanPoint : * chanPoint ,
1141+ ChanPoint : chanPoint ,
11421142 ProcessACK : func (brarErr error ) {
11431143 processACK <- brarErr
11441144 },
@@ -1166,7 +1166,7 @@ func TestBreachHandoffFail(t *testing.T) {
11661166 // Check that the breach was properly recorded in the breach arbiter,
11671167 // and that the close observer marked the channel as pending closed
11681168 // before exiting.
1169- assertArbiterBreach (t , brar , chanPoint )
1169+ assertArbiterBreach (t , brar , & chanPoint )
11701170}
11711171
11721172// TestBreachCreateJusticeTx tests that we create three different variants of
@@ -1560,7 +1560,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
15601560 var (
15611561 height = bobClose .ChanSnapshot .CommitHeight
15621562 forceCloseTx = bobClose .CloseTx
1563- chanPoint = alice .ChanPoint
1563+ chanPoint = alice .ChannelPoint ()
15641564 publTx = make (chan * wire.MsgTx )
15651565 publErr error
15661566 publMtx sync.Mutex
@@ -1590,7 +1590,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
15901590
15911591 processACK := make (chan error )
15921592 breach := & ContractBreachEvent {
1593- ChanPoint : * chanPoint ,
1593+ ChanPoint : chanPoint ,
15941594 ProcessACK : func (brarErr error ) {
15951595 processACK <- brarErr
15961596 },
@@ -1630,7 +1630,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
16301630 // After exiting, the breach arbiter should have persisted the
16311631 // retribution information and the channel should be shown as pending
16321632 // force closed.
1633- assertArbiterBreach (t , brar , chanPoint )
1633+ assertArbiterBreach (t , brar , & chanPoint )
16341634
16351635 // Assert that the database sees the channel as pending close, otherwise
16361636 // the breach arbiter won't be able to fully close it.
@@ -1669,7 +1669,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
16691669 htlcOutpoint := retribution .HtlcRetributions [0 ].OutPoint
16701670
16711671 spendTxs , err := getSpendTransactions (
1672- brar .cfg .Signer , chanPoint , retribution ,
1672+ brar .cfg .Signer , & chanPoint , retribution ,
16731673 )
16741674 require .NoError (t , err )
16751675
@@ -1764,7 +1764,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
17641764 }
17651765
17661766 // Assert that the channel is fully resolved.
1767- assertBrarCleanup (t , brar , alice . ChanPoint , alice .State ().Db )
1767+ assertBrarCleanup (t , brar , & chanPoint , alice .State ().Db )
17681768}
17691769
17701770// TestBreachDelayedJusticeConfirmation tests that the breach arbiter will
@@ -1777,7 +1777,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
17771777 height = bobClose .ChanSnapshot .CommitHeight
17781778 blockHeight = int32 (10 )
17791779 forceCloseTx = bobClose .CloseTx
1780- chanPoint = alice .ChanPoint
1780+ chanPoint = alice .ChannelPoint ()
17811781 publTx = make (chan * wire.MsgTx )
17821782 )
17831783
@@ -1799,7 +1799,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
17991799
18001800 processACK := make (chan error , 1 )
18011801 breach := & ContractBreachEvent {
1802- ChanPoint : * chanPoint ,
1802+ ChanPoint : chanPoint ,
18031803 ProcessACK : func (brarErr error ) {
18041804 processACK <- brarErr
18051805 },
@@ -1840,7 +1840,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
18401840 // After exiting, the breach arbiter should have persisted the
18411841 // retribution information and the channel should be shown as pending
18421842 // force closed.
1843- assertArbiterBreach (t , brar , chanPoint )
1843+ assertArbiterBreach (t , brar , & chanPoint )
18441844
18451845 // Assert that the database sees the channel as pending close, otherwise
18461846 // the breach arbiter won't be able to fully close it.
@@ -1965,7 +1965,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
19651965 }
19661966
19671967 // Assert that the channel is fully resolved.
1968- assertBrarCleanup (t , brar , alice . ChanPoint , alice .State ().Db )
1968+ assertBrarCleanup (t , brar , & chanPoint , alice .State ().Db )
19691969}
19701970
19711971// findInputIndex returns the index of the input that spends from the given
@@ -2081,12 +2081,12 @@ func assertPendingClosed(t *testing.T, c *lnwallet.LightningChannel) {
20812081 require .NoError (t , err , "unable to load pending closed channels" )
20822082
20832083 for _ , chanSummary := range closedChans {
2084- if chanSummary .ChanPoint == * c . ChanPoint {
2084+ if chanSummary .ChanPoint == c . ChannelPoint () {
20852085 return
20862086 }
20872087 }
20882088
2089- t .Fatalf ("channel %v was not marked pending closed" , c .ChanPoint )
2089+ t .Fatalf ("channel %v was not marked pending closed" , c .ChannelPoint () )
20902090}
20912091
20922092// assertNotPendingClosed checks that the channel has not been marked pending
@@ -2098,9 +2098,9 @@ func assertNotPendingClosed(t *testing.T, c *lnwallet.LightningChannel) {
20982098 require .NoError (t , err , "unable to load pending closed channels" )
20992099
21002100 for _ , chanSummary := range closedChans {
2101- if chanSummary .ChanPoint == * c . ChanPoint {
2101+ if chanSummary .ChanPoint == c . ChannelPoint () {
21022102 t .Fatalf ("channel %v was marked pending closed" ,
2103- c .ChanPoint )
2103+ c .ChannelPoint () )
21042104 }
21052105 }
21062106}
0 commit comments