multi: add new NoRevLogAmtData config option

In this commit, a new `--db.no-rev-log-amt-data` flag is added. The
config option is passed though to everywhere that it will be used. Note
that it is still a no-op in this commit. An upcoming commit will make
use of the flag.
This commit is contained in:
Elle Mouton
2023-02-10 10:13:34 +02:00
parent 9c01916bc0
commit 0730337cc7
11 changed files with 55 additions and 12 deletions

View File

@@ -981,6 +981,13 @@ func ValidateConfig(cfg Config, interceptor signal.Interceptor, fileParser,
)
}
// Ensure that the amount data for revoked commitment transactions is
// stored if the watchtower client is active.
if cfg.DB.NoRevLogAmtData && cfg.WtClient.Active {
return nil, mkErr("revocation log amount data must be stored " +
"if the watchtower client is active")
}
// Ensure a valid max channel fee allocation was set.
if cfg.MaxChannelFeeAllocation <= 0 || cfg.MaxChannelFeeAllocation > 1 {
return nil, mkErr("invalid max channel fee allocation: %v, "+