@@ -693,11 +693,15 @@ func TestChannelArbitratorLocalForceClose(t *testing.T) {
693693 chanArbCtx .AssertState (StateCommitmentBroadcasted )
694694
695695 // Now notify about the local force close getting confirmed.
696+ //
697+ //nolint:lll
696698 chanArb .cfg .ChainEvents .LocalUnilateralClosure <- & LocalUnilateralCloseInfo {
697699 SpendDetail : & chainntnfs.SpendDetail {},
698700 LocalForceCloseSummary : & lnwallet.LocalForceCloseSummary {
699- CloseTx : & wire.MsgTx {},
700- HtlcResolutions : & lnwallet.HtlcResolutions {},
701+ CloseTx : & wire.MsgTx {},
702+ ContractResolutions : fn .Some (lnwallet.ContractResolutions {
703+ HtlcResolutions : & lnwallet.HtlcResolutions {},
704+ }),
701705 },
702706 ChannelCloseSummary : & channeldb.ChannelCloseSummary {},
703707 }
@@ -987,15 +991,18 @@ func TestChannelArbitratorLocalForceClosePendingHtlc(t *testing.T) {
987991 },
988992 }
989993
994+ //nolint:lll
990995 chanArb .cfg .ChainEvents .LocalUnilateralClosure <- & LocalUnilateralCloseInfo {
991996 SpendDetail : & chainntnfs.SpendDetail {},
992997 LocalForceCloseSummary : & lnwallet.LocalForceCloseSummary {
993998 CloseTx : closeTx ,
994- HtlcResolutions : & lnwallet.HtlcResolutions {
995- OutgoingHTLCs : []lnwallet.OutgoingHtlcResolution {
996- outgoingRes ,
999+ ContractResolutions : fn .Some (lnwallet.ContractResolutions {
1000+ HtlcResolutions : & lnwallet.HtlcResolutions {
1001+ OutgoingHTLCs : []lnwallet.OutgoingHtlcResolution {
1002+ outgoingRes ,
1003+ },
9971004 },
998- },
1005+ }) ,
9991006 },
10001007 ChannelCloseSummary : & channeldb.ChannelCloseSummary {},
10011008 CommitSet : CommitSet {
@@ -1613,12 +1620,15 @@ func TestChannelArbitratorCommitFailure(t *testing.T) {
16131620 },
16141621 {
16151622 closeType : channeldb .LocalForceClose ,
1623+ //nolint:lll
16161624 sendEvent : func (chanArb * ChannelArbitrator ) {
16171625 chanArb .cfg .ChainEvents .LocalUnilateralClosure <- & LocalUnilateralCloseInfo {
16181626 SpendDetail : & chainntnfs.SpendDetail {},
16191627 LocalForceCloseSummary : & lnwallet.LocalForceCloseSummary {
1620- CloseTx : & wire.MsgTx {},
1621- HtlcResolutions : & lnwallet.HtlcResolutions {},
1628+ CloseTx : & wire.MsgTx {},
1629+ ContractResolutions : fn .Some (lnwallet.ContractResolutions {
1630+ HtlcResolutions : & lnwallet.HtlcResolutions {},
1631+ }),
16221632 },
16231633 ChannelCloseSummary : & channeldb.ChannelCloseSummary {},
16241634 }
@@ -1946,11 +1956,15 @@ func TestChannelArbitratorDanglingCommitForceClose(t *testing.T) {
19461956 // being canalled back. Also note that there're no HTLC
19471957 // resolutions sent since we have none on our
19481958 // commitment transaction.
1959+ //
1960+ //nolint:lll
19491961 uniCloseInfo := & LocalUnilateralCloseInfo {
19501962 SpendDetail : & chainntnfs.SpendDetail {},
19511963 LocalForceCloseSummary : & lnwallet.LocalForceCloseSummary {
1952- CloseTx : closeTx ,
1953- HtlcResolutions : & lnwallet.HtlcResolutions {},
1964+ CloseTx : closeTx ,
1965+ ContractResolutions : fn .Some (lnwallet.ContractResolutions {
1966+ HtlcResolutions : & lnwallet.HtlcResolutions {},
1967+ }),
19541968 },
19551969 ChannelCloseSummary : & channeldb.ChannelCloseSummary {},
19561970 CommitSet : CommitSet {
@@ -2870,12 +2884,15 @@ func TestChannelArbitratorAnchors(t *testing.T) {
28702884 },
28712885 }
28722886
2887+ //nolint:lll
28732888 chanArb .cfg .ChainEvents .LocalUnilateralClosure <- & LocalUnilateralCloseInfo {
28742889 SpendDetail : & chainntnfs.SpendDetail {},
28752890 LocalForceCloseSummary : & lnwallet.LocalForceCloseSummary {
2876- CloseTx : closeTx ,
2877- HtlcResolutions : & lnwallet.HtlcResolutions {},
2878- AnchorResolution : anchorResolution ,
2891+ CloseTx : closeTx ,
2892+ ContractResolutions : fn .Some (lnwallet.ContractResolutions {
2893+ HtlcResolutions : & lnwallet.HtlcResolutions {},
2894+ AnchorResolution : anchorResolution ,
2895+ }),
28792896 },
28802897 ChannelCloseSummary : & channeldb.ChannelCloseSummary {},
28812898 CommitSet : CommitSet {
@@ -3109,14 +3126,10 @@ func (m *mockChannel) NewAnchorResolutions() (*lnwallet.AnchorResolutions,
31093126 return & lnwallet.AnchorResolutions {}, nil
31103127}
31113128
3112- func (m * mockChannel ) ForceCloseChan () (* lnwallet. LocalForceCloseSummary , error ) {
3129+ func (m * mockChannel ) ForceCloseChan () (* wire. MsgTx , error ) {
31133130 if m .forceCloseErr != nil {
31143131 return nil , m .forceCloseErr
31153132 }
31163133
3117- summary := & lnwallet.LocalForceCloseSummary {
3118- CloseTx : & wire.MsgTx {},
3119- HtlcResolutions : & lnwallet.HtlcResolutions {},
3120- }
3121- return summary , nil
3134+ return & wire.MsgTx {}, nil
31223135}
0 commit comments