Skip to content

Commit c41edaf

Browse files
Disable moving funds action trigger for release v2.0.0
Here we are introducing a "feature flag" that disables the moving funds (and moved funds sweep) feature for the release v2.0.0. We are disabling it as the feature is not yet ready for mainnet release.
1 parent 0a488cc commit c41edaf

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

pkg/tbtc/coordination.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,15 @@ func (ce *coordinationExecutor) getActionsChecklist(
548548
actions = append(actions, ActionDepositSweep)
549549
}
550550

551-
if windowIndex%frequencyWindows == 0 {
552-
actions = append(actions, ActionMovedFundsSweep)
553-
}
554-
555-
// TODO: Consider increasing frequency for old wallets in the future.
556-
if windowIndex%frequencyWindows == 0 {
557-
actions = append(actions, ActionMovingFunds)
558-
}
551+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
552+
// if windowIndex%frequencyWindows == 0 {
553+
// actions = append(actions, ActionMovedFundsSweep)
554+
// }
555+
556+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
557+
// if windowIndex%frequencyWindows == 0 {
558+
// actions = append(actions, ActionMovingFunds)
559+
// }
559560

560561
// #nosec G404 (insecure random number source (rand))
561562
// Drawing a decision about heartbeat does not require secure randomness.

pkg/tbtc/node.go

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -873,25 +873,26 @@ func processCoordinationResult(node *node, result *coordinationResult) {
873873
expiryBlock,
874874
)
875875
}
876-
case ActionMovingFunds:
877-
if proposal, ok := result.proposal.(*MovingFundsProposal); ok {
878-
node.handleMovingFundsProposal(
879-
result.wallet,
880-
proposal,
881-
startBlock,
882-
expiryBlock,
883-
)
884-
}
885-
// TODO: Uncomment when moving funds support is implemented.
886-
case ActionMovedFundsSweep:
887-
if proposal, ok := result.proposal.(*MovedFundsSweepProposal); ok {
888-
node.handleMovedFundsSweepProposal(
889-
result.wallet,
890-
proposal,
891-
startBlock,
892-
expiryBlock,
893-
)
894-
}
876+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
877+
// case ActionMovingFunds:
878+
// if proposal, ok := result.proposal.(*MovingFundsProposal); ok {
879+
// node.handleMovingFundsProposal(
880+
// result.wallet,
881+
// proposal,
882+
// startBlock,
883+
// expiryBlock,
884+
// )
885+
// }
886+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
887+
// case ActionMovedFundsSweep:
888+
// if proposal, ok := result.proposal.(*MovedFundsSweepProposal); ok {
889+
// node.handleMovedFundsSweepProposal(
890+
// result.wallet,
891+
// proposal,
892+
// startBlock,
893+
// expiryBlock,
894+
// )
895+
// }
895896
default:
896897
logger.Errorf("no handler for coordination result [%s]", result)
897898
}

pkg/tbtcpg/tbtcpg.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ func NewProposalGenerator(
4040
NewDepositSweepTask(chain, btcChain),
4141
NewRedemptionTask(chain, btcChain),
4242
NewHeartbeatTask(chain),
43-
NewMovingFundsTask(chain, btcChain),
44-
NewMovedFundsSweepTask(chain, btcChain),
43+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
44+
// NewMovingFundsTask(chain, btcChain),
45+
// TODO: Disabled for v2.0.0. Uncomment when the feature is ready.
46+
// NewMovedFundsSweepTask(chain, btcChain),
4547
}
4648

4749
return &ProposalGenerator{

0 commit comments

Comments
 (0)