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:
Oliver Gugger authored and GitHub committed 2024-08-05 02:08:52 -06:00
commit 11c7e20d0a
15 files changed
+338 -242

No files matched your search

+1 -1
View File
@@ -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
}
+2 -2
View File
@@ -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
}