dc13da5abb
If nodes return a channel policy related failure, they may get a second chance. Our graph may not be up to date. Previously this logic was contained in the payment session. This commit moves that into global mission control and thereby removes the last mission control state that was kept on the payment level. Because mission control is not aware of the relation between payment attempts and payments, the second chance logic is no longer based tracking second chances given per payment. Instead a time based approach is used. If a node reports a policy failure that prevents forwarding to its peer, it will get a second chance. But it will get it only if the previous second chance was long enough ago. Also those second chances are no longer dependent on whether an associated channel update is valid. It will get the second chance regardless, to prevent creating a dependency between mission control and the graph. This would interfer with (future) replay of history, because the graph may not be the same anymore at that point.
11 lines
187 B
Go
11 lines
187 B
Go
package routing
|
|
|
|
import (
|
|
"github.com/lightningnetwork/lnd/routing/route"
|
|
)
|
|
|
|
// DirectedNodePair stores a directed pair of nodes.
|
|
type DirectedNodePair struct {
|
|
From, To route.Vertex
|
|
}
|