From 69ab717fe4e5170d45f740ab8421e1e70976c42a Mon Sep 17 00:00:00 2001 From: pk910 Date: Fri, 12 Apr 2024 18:25:57 +0200 Subject: [PATCH] fixes --- pkg/coordinator/tasks/generate_shadowfork_funding/config.go | 2 +- pkg/coordinator/tasks/generate_shadowfork_funding/task.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/coordinator/tasks/generate_shadowfork_funding/config.go b/pkg/coordinator/tasks/generate_shadowfork_funding/config.go index 0c56f23..c279f18 100644 --- a/pkg/coordinator/tasks/generate_shadowfork_funding/config.go +++ b/pkg/coordinator/tasks/generate_shadowfork_funding/config.go @@ -23,7 +23,7 @@ func DefaultConfig() Config { return Config{ ShadowForkVaultContract: "0x9620e3933dAAa49EBe3250b731291ac817E24372", - MinBalance: big.NewInt(0), // 0 ETH + MinBalance: big.NewInt(1000000000000000000), // 1 ETH TxFeeCap: big.NewInt(100000000000), // 100 Gwei TxTipCap: big.NewInt(1000000000), // 1 Gwei RequestAmount: big.NewInt(1000000000000000000), // 1 ETH diff --git a/pkg/coordinator/tasks/generate_shadowfork_funding/task.go b/pkg/coordinator/tasks/generate_shadowfork_funding/task.go index 63951b4..9380ee2 100644 --- a/pkg/coordinator/tasks/generate_shadowfork_funding/task.go +++ b/pkg/coordinator/tasks/generate_shadowfork_funding/task.go @@ -124,8 +124,8 @@ func (t *Task) Execute(ctx context.Context) error { t.logger.Infof("root wallet: %v [nonce: %v] %v ETH", t.wallet.GetAddress().Hex(), t.wallet.GetNonce(), t.wallet.GetReadableBalance(18, 0, 4, false, false)) - if t.wallet.GetBalance().Cmp(t.config.MinBalance) <= 0 { - t.logger.Infof("balance exceeds minBalance (%v ETH), skipping shadow vault request", wallet.GetReadableBalance(t.config.MinBalance, 18, 0, 4, false, false)) + if t.wallet.GetBalance().Cmp(t.config.MinBalance) >= 0 { + t.logger.Infof("balance (%v ETH) exceeds minBalance (%v ETH), skipping shadow vault request", t.wallet.GetReadableBalance(18, 0, 4, false, false), wallet.GetReadableBalance(t.config.MinBalance, 18, 0, 4, false, false)) return nil }