routing: stricter maxHTLC checks

We require channel updates to have the max HTLC message flag set.

Several flows need to pass that check before channel updates are
forwarded to peers:
* after channel funding: `addToRouterGraph`
* after receiving channel updates from a peer:
  `ProcessRemoteAnnouncement`
* after we update channel policies: `PropagateChanPolicyUpdate`
This commit is contained in:
bitromortac committed 2023-02-21 14:03:51 +01:00
1 parent dd5273c88c
commit 6aac2762b3
4 files changed
+77 -29

No files matched your search

+2 -2
View File
@@ -182,8 +182,8 @@ func TestUpdateDisableFlag(t *testing.T) {
// Finally, validate the signature using the router's
// verification logic.
err = routing.ValidateChannelUpdateAnn(
pubKey, 0, newUpdate,
err = routing.VerifyChannelUpdateSignature(
newUpdate, pubKey,
)
if err != nil {
t.Fatalf("channel update failed to "+