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:
Louis Singer
2024-02-22 16:47:52 +01:00
committed by GitHub
parent 7c8ee7ab12
commit a95a829b20
30 changed files with 1244 additions and 719 deletions

View File

@@ -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
}