funding+server.go: modify notifications to pass through server

This modifies the various channelnotifier notification functions
to instead hit the server and then call the notification routine.
This allows us to accurately modify the server's maps.
This commit is contained in:
Eugene Siegel
2025-01-16 10:43:37 -05:00
parent 6eb746fbba
commit 68ec766b61
3 changed files with 62 additions and 10 deletions

View File

@@ -1681,9 +1681,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
MaxPendingChannels: cfg.MaxPendingChannels,
RejectPush: cfg.RejectPush,
MaxLocalCSVDelay: chainCfg.MaxLocalDelay,
NotifyOpenChannelEvent: s.channelNotifier.NotifyOpenChannelEvent,
NotifyOpenChannelEvent: s.notifyOpenChannelPeerEvent,
OpenChannelPredicate: chanPredicate,
NotifyPendingOpenChannelEvent: s.channelNotifier.NotifyPendingOpenChannelEvent,
NotifyPendingOpenChannelEvent: s.notifyPendingOpenChannelPeerEvent,
NotifyFundingTimeout: s.notifyFundingTimeoutPeerEvent,
EnableUpfrontShutdown: cfg.EnableUpfrontShutdown,
MaxAnchorsCommitFeeRate: chainfee.SatPerKVByte(
s.cfg.MaxCommitFeeRateAnchors * 1000).FeePerKWeight(),