mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 20:54:20 +01:00
Add support for unilateral exit (#79)
* v0 unilateral redemption * add fee outputs to congestion tree * unilateral exit * rework unilateral exit verbosity * substract fee from vtxo amount * remove unused functions and variables * fix after reviews * Update noah/explorer.go Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com> Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com> * remove bufferutils --------- Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com> Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -36,6 +36,7 @@ type Config struct {
|
||||
SchedulerType string
|
||||
TxBuilderType string
|
||||
WalletAddr string
|
||||
MinRelayFee uint64
|
||||
|
||||
repo ports.RepoManager
|
||||
svc application.Service
|
||||
@@ -62,6 +63,9 @@ func (c *Config) Validate() error {
|
||||
if len(c.WalletAddr) <= 0 {
|
||||
return fmt.Errorf("missing onchain wallet address")
|
||||
}
|
||||
if c.MinRelayFee < 30 {
|
||||
return fmt.Errorf("invalid min relay fee, must be at least 30 sats")
|
||||
}
|
||||
if err := c.repoManager(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -140,7 +144,7 @@ func (c *Config) txBuilderService() error {
|
||||
func (c *Config) appService() error {
|
||||
net := c.mainChain()
|
||||
svc, err := application.NewService(
|
||||
c.RoundInterval, c.Network, net, c.wallet, c.repo, c.txBuilder,
|
||||
c.RoundInterval, c.Network, net, c.wallet, c.repo, c.txBuilder, c.MinRelayFee,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user