mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 12:44:19 +01:00
Delay unilateral exit and support send to onchain address (#117)
* add delay on redeem close + forfeit close * increase default round lifetime (16 minutes min) * add sequence to final pset * update CLI and server to support delayed vtxos oncahin * rename future to "locked" * add configurable EXIT_DELAY variable * renaming * rename "close" --> "closure" * rename "close" to "closure" * error message config.go
This commit is contained in:
@@ -24,6 +24,7 @@ type Config struct {
|
||||
LogLevel int
|
||||
MinRelayFee uint64
|
||||
RoundLifetime int64
|
||||
ExitDelay int64
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -40,6 +41,7 @@ var (
|
||||
Network = "NETWORK"
|
||||
MinRelayFee = "MIN_RELAY_FEE"
|
||||
RoundLifetime = "ROUND_LIFETIME"
|
||||
ExitDelay = "EXIT_DELAY"
|
||||
|
||||
defaultDatadir = common.AppDataDir("arkd", false)
|
||||
defaultRoundInterval = 10
|
||||
@@ -53,6 +55,7 @@ var (
|
||||
defaultLogLevel = 5
|
||||
defaultMinRelayFee = 30
|
||||
defaultRoundLifetime = 512
|
||||
defaultExitDelay = 512
|
||||
)
|
||||
|
||||
func LoadConfig() (*Config, error) {
|
||||
@@ -71,6 +74,7 @@ func LoadConfig() (*Config, error) {
|
||||
viper.SetDefault(Network, defaultNetwork)
|
||||
viper.SetDefault(RoundLifetime, defaultRoundLifetime)
|
||||
viper.SetDefault(MinRelayFee, defaultMinRelayFee)
|
||||
viper.SetDefault(ExitDelay, defaultExitDelay)
|
||||
|
||||
net, err := getNetwork()
|
||||
if err != nil {
|
||||
@@ -95,6 +99,7 @@ func LoadConfig() (*Config, error) {
|
||||
Network: net,
|
||||
MinRelayFee: viper.GetUint64(MinRelayFee),
|
||||
RoundLifetime: viper.GetInt64(RoundLifetime),
|
||||
ExitDelay: viper.GetInt64(ExitDelay),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user