mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 20:27:48 +02:00
Merge pull request #8953 from ProofOfKeags/refactor/lnwallet-channel-channel-constraints-partition
[MICRO]: multi: break ChannelConstraints into two sub-structures
This commit is contained in:
@@ -279,7 +279,7 @@ func (r *Manager) getHtlcAmtLimits(tx kvdb.RTx, chanPoint wire.OutPoint) (
|
||||
// capacity AND less than or equal to the max in-flight HTLC value.
|
||||
// Since the latter is always less than or equal to the former, just
|
||||
// return the max in-flight value.
|
||||
maxAmt := ch.LocalChanCfg.ChannelConstraints.MaxPendingAmount
|
||||
maxAmt := ch.LocalChanCfg.ChannelStateBounds.MaxPendingAmount
|
||||
|
||||
return ch.LocalChanCfg.MinHTLC, maxAmt, nil
|
||||
}
|
||||
|
@@ -125,14 +125,14 @@ func TestManager(t *testing.T) {
|
||||
return &channeldb.OpenChannel{}, channeldb.ErrChannelNotFound
|
||||
}
|
||||
|
||||
constraints := channeldb.ChannelConstraints{
|
||||
bounds := channeldb.ChannelStateBounds{
|
||||
MaxPendingAmount: maxPendingAmount,
|
||||
MinHTLC: minHTLC,
|
||||
}
|
||||
|
||||
return &channeldb.OpenChannel{
|
||||
LocalChanCfg: channeldb.ChannelConfig{
|
||||
ChannelConstraints: constraints,
|
||||
ChannelStateBounds: bounds,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user