multi: add debug logs for edge policy flow

This commit adds more logs around the ChannelUpdate->edge policy process
flow.
This commit is contained in:
yyforyongyu committed 2025-01-17 00:17:23 +08:00
1 parent e0a920af44
commit 001e5599b6
8 files changed
+43 -10

No files matched your search

+8
View File
@@ -1,6 +1,7 @@
package models
import (
"fmt"
"time"
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
@@ -113,3 +114,10 @@ func (c *ChannelEdgePolicy) ComputeFee(
return c.FeeBaseMSat + (amt*c.FeeProportionalMillionths)/feeRateParts
}
// String returns a human-readable version of the channel edge policy.
func (c *ChannelEdgePolicy) String() string {
return fmt.Sprintf("ChannelID=%v, MessageFlags=%v, ChannelFlags=%v, "+
"LastUpdate=%v", c.ChannelID, c.MessageFlags, c.ChannelFlags,
c.LastUpdate)
}