multi: make tower MaxUpdates configurable
This is helpful in an itest environment where we want to quickly saturate a session.
This commit is contained in:
3 files changed
+11
No files matched your search
@@ -22,6 +22,10 @@ type WtClient struct {
|
|||||||
// of blocks to wait after the last channel of a session is closed
|
// of blocks to wait after the last channel of a session is closed
|
||||||
// before sending the DeleteSession message to the tower server.
|
// before sending the DeleteSession message to the tower server.
|
||||||
SessionCloseRange uint32 `long:"session-close-range" description:"The range over which to choose a random number of blocks to wait after the last channel of a session is closed before sending the DeleteSession message to the tower server. Set to 1 for no delay."`
|
SessionCloseRange uint32 `long:"session-close-range" description:"The range over which to choose a random number of blocks to wait after the last channel of a session is closed before sending the DeleteSession message to the tower server. Set to 1 for no delay."`
|
||||||
|
|
||||||
|
// MaxUpdates is the maximum number of updates to be backed up in a
|
||||||
|
// single tower sessions.
|
||||||
|
MaxUpdates uint16 `long:"max-updates" description:"The maximum number of updates to be backed up in a single session."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate ensures the user has provided a valid configuration.
|
// Validate ensures the user has provided a valid configuration.
|
||||||
|
|||||||
@@ -1004,6 +1004,9 @@ litecoin.node=ltcd
|
|||||||
; along with reduced privacy from the tower server.
|
; along with reduced privacy from the tower server.
|
||||||
; wtclient.session-close-range=10
|
; wtclient.session-close-range=10
|
||||||
|
|
||||||
|
; The maximum number of updates to include in a tower session.
|
||||||
|
; wtclient.max-updates=1024
|
||||||
|
|
||||||
[healthcheck]
|
[healthcheck]
|
||||||
|
|
||||||
; The number of times we should attempt to query our chain backend before
|
; The number of times we should attempt to query our chain backend before
|
||||||
|
|||||||
@@ -1497,6 +1497,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
policy.SweepFeeRate = sweepRateSatPerVByte.FeePerKWeight()
|
policy.SweepFeeRate = sweepRateSatPerVByte.FeePerKWeight()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.WtClient.MaxUpdates != 0 {
|
||||||
|
policy.MaxUpdates = cfg.WtClient.MaxUpdates
|
||||||
|
}
|
||||||
|
|
||||||
sessionCloseRange := uint32(wtclient.DefaultSessionCloseRange)
|
sessionCloseRange := uint32(wtclient.DefaultSessionCloseRange)
|
||||||
if cfg.WtClient.SessionCloseRange != 0 {
|
if cfg.WtClient.SessionCloseRange != 0 {
|
||||||
sessionCloseRange = cfg.WtClient.SessionCloseRange
|
sessionCloseRange = cfg.WtClient.SessionCloseRange
|
||||||
|
|||||||
Reference in new issue
Block a user