lnwallet: only the initiator needs to validate new fee updates
In this commit, we fix an existing bug, as only the initiator needs to validate any new fee updates. If the initiator sends an invalid fee, then it will be rejected by the responder as it may put them below their required reserve.
This commit is contained in:
2 files changed
+3
-9
No files matched your search
@@ -3385,7 +3385,7 @@ func TestFeeUpdateRejectInsaneFee(t *testing.T) {
|
||||
// Create a test channel which will be used for the duration of this
|
||||
// unittest. The channel will be funded evenly with Alice having 5 BTC,
|
||||
// and Bob having 5 BTC.
|
||||
aliceChannel, bobChannel, cleanUp, err := createTestChannels(1)
|
||||
aliceChannel, _, cleanUp, err := createTestChannels(1)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create test channels: %v", err)
|
||||
}
|
||||
@@ -3401,9 +3401,6 @@ func TestFeeUpdateRejectInsaneFee(t *testing.T) {
|
||||
if err := aliceChannel.UpdateFee(newFeeRate); err == nil {
|
||||
t.Fatalf("alice should've rejected fee update")
|
||||
}
|
||||
if err := bobChannel.ReceiveUpdateFee(newFeeRate); err == nil {
|
||||
t.Fatalf("bob should've rejected fee update")
|
||||
}
|
||||
}
|
||||
|
||||
// TestChannelRetransmissionFeeUpdate tests that the initiator will include any
|
||||
|
||||
Reference in new issue
Block a user