config: adds cli configurable --migration-dry-run
This commit is contained in:
parent
c775819372
commit
4f6cef83fc
@ -340,6 +340,8 @@ type config struct {
|
|||||||
|
|
||||||
MaxChannelFeeAllocation float64 `long:"max-channel-fee-allocation" description:"The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for the initiator of the channel. Valid values are within [0.1, 1]."`
|
MaxChannelFeeAllocation float64 `long:"max-channel-fee-allocation" description:"The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for the initiator of the channel. Valid values are within [0.1, 1]."`
|
||||||
|
|
||||||
|
DryRunMigration bool `long:"dry-run-migration" description:"If true, lnd will abort committing a migration if it would otherwise have been successful. This leaves the database unmodified, and still compatible with the previously active version of lnd."`
|
||||||
|
|
||||||
net tor.Net
|
net tor.Net
|
||||||
|
|
||||||
EnableUpfrontShutdown bool `long:"enable-upfront-shutdown" description:"If true, option upfront shutdown script will be enabled. If peers that we open channels with support this feature, we will automatically set the script to which cooperative closes should be paid out to on channel open. This offers the partial protection of a channel peer disconnecting from us if cooperative close is attempted with a different script."`
|
EnableUpfrontShutdown bool `long:"enable-upfront-shutdown" description:"If true, option upfront shutdown script will be enabled. If peers that we open channels with support this feature, we will automatically set the script to which cooperative closes should be paid out to on channel open. This offers the partial protection of a channel peer disconnecting from us if cooperative close is attempted with a different script."`
|
||||||
|
11
lnd.go
11
lnd.go
@ -235,10 +235,15 @@ func Main(lisCfg ListenerCfg) error {
|
|||||||
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),
|
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),
|
||||||
channeldb.OptionSetChannelCacheSize(cfg.Caches.ChannelCacheSize),
|
channeldb.OptionSetChannelCacheSize(cfg.Caches.ChannelCacheSize),
|
||||||
channeldb.OptionSetSyncFreelist(cfg.SyncFreelist),
|
channeldb.OptionSetSyncFreelist(cfg.SyncFreelist),
|
||||||
|
channeldb.OptionDryRunMigration(cfg.DryRunMigration),
|
||||||
)
|
)
|
||||||
if err != nil {
|
switch {
|
||||||
err := fmt.Errorf("unable to open channeldb: %v", err)
|
case err == channeldb.ErrDryRunMigrationOK:
|
||||||
ltndLog.Error(err)
|
ltndLog.Info("%v, exiting", err)
|
||||||
|
return nil
|
||||||
|
|
||||||
|
case err != nil:
|
||||||
|
ltndLog.Errorf("Unable to open channeldb: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer chanDB.Close()
|
defer chanDB.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user