mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-29 06:02:41 +02:00
test: update testUpdateChannelPolicy to ensure Bob's link uses the proper policies
In this commit, we update the testUpdateChannelPolicy to exercise the recent set of changes within the switch. If one applies this test to a fresh branch (without those new changes) it should fail. This is due to the fact that before, Bob would attempt to apply the constraints of the incoming link (which we updated) instead of the outgoing link. With the recent set of changes, the test now properly passes.
This commit is contained in:
@@ -393,10 +393,10 @@ func (s *Switch) UpdateForwardingPolicies(newPolicy ForwardingPolicy,
|
||||
return spew.Sdump(newPolicy)
|
||||
}))
|
||||
|
||||
s.indexMtx.RLock()
|
||||
|
||||
var linksToUpdate []ChannelLink
|
||||
|
||||
s.indexMtx.RLock()
|
||||
|
||||
// If no channels have been targeted, then we'll collect all inks to
|
||||
// update their policies.
|
||||
if len(targetChans) == 0 {
|
||||
|
Reference in New Issue
Block a user