mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-09 18:52:09 +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:
@@ -1147,6 +1147,12 @@ func (d *AuthenticatedGossiper) processChanPolicyUpdate(
|
||||
}
|
||||
|
||||
haveChanFilter := len(chansToUpdate) != 0
|
||||
if haveChanFilter {
|
||||
log.Infof("Updating routing policies for chan_points=%v",
|
||||
spew.Sdump(chansToUpdate))
|
||||
} else {
|
||||
log.Infof("Updating routing policies for all chans")
|
||||
}
|
||||
|
||||
type edgeWithInfo struct {
|
||||
info *channeldb.ChannelEdgeInfo
|
||||
@@ -2145,8 +2151,8 @@ func (d *AuthenticatedGossiper) updateChannel(info *channeldb.ChannelEdgeInfo,
|
||||
|
||||
var err error
|
||||
|
||||
// Make sure timestamp is always increased, such that our update
|
||||
// gets propagated.
|
||||
// Make sure timestamp is always increased, such that our update gets
|
||||
// propagated.
|
||||
timestamp := time.Now().Unix()
|
||||
if timestamp <= edge.LastUpdate.Unix() {
|
||||
timestamp = edge.LastUpdate.Unix() + 1
|
||||
|
Reference in New Issue
Block a user