mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
multi: refactor lnwallet/channel.go to use ChannelParty in select places
We also include changes to contractcourt, htlcswitch and peer to stitch the boundaries together.
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnutils"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
@@ -150,7 +151,9 @@ func (m *mockChannel) ChannelPoint() wire.OutPoint {
|
||||
return m.chanPoint
|
||||
}
|
||||
|
||||
func (m *mockChannel) MarkCoopBroadcasted(*wire.MsgTx, bool) error {
|
||||
func (m *mockChannel) MarkCoopBroadcasted(*wire.MsgTx,
|
||||
lntypes.ChannelParty) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -338,7 +341,7 @@ func TestMaxFeeClamp(t *testing.T) {
|
||||
Channel: &channel,
|
||||
MaxFee: test.inputMaxFee,
|
||||
FeeEstimator: &SimpleCoopFeeEstimator{},
|
||||
}, nil, test.idealFee, 0, nil, false,
|
||||
}, nil, test.idealFee, 0, nil, lntypes.Remote,
|
||||
)
|
||||
|
||||
// We'll call initFeeBaseline early here since we need
|
||||
@@ -379,7 +382,7 @@ func TestMaxFeeBailOut(t *testing.T) {
|
||||
MaxFee: idealFee * 2,
|
||||
}
|
||||
chanCloser := NewChanCloser(
|
||||
closeCfg, nil, idealFee, 0, nil, false,
|
||||
closeCfg, nil, idealFee, 0, nil, lntypes.Remote,
|
||||
)
|
||||
|
||||
// We'll now force the channel state into the
|
||||
@@ -503,7 +506,7 @@ func TestTaprootFastClose(t *testing.T) {
|
||||
DisableChannel: func(wire.OutPoint) error {
|
||||
return nil
|
||||
},
|
||||
}, nil, idealFee, 0, nil, true,
|
||||
}, nil, idealFee, 0, nil, lntypes.Local,
|
||||
)
|
||||
aliceCloser.initFeeBaseline()
|
||||
|
||||
@@ -520,7 +523,7 @@ func TestTaprootFastClose(t *testing.T) {
|
||||
DisableChannel: func(wire.OutPoint) error {
|
||||
return nil
|
||||
},
|
||||
}, nil, idealFee, 0, nil, false,
|
||||
}, nil, idealFee, 0, nil, lntypes.Remote,
|
||||
)
|
||||
bobCloser.initFeeBaseline()
|
||||
|
||||
|
Reference in New Issue
Block a user