File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 4646 ErrMissingPreviousWithdrawn = errors .New ("can't bump fee for subset " +
4747 "of clustered deposits" )
4848
49+ // ErrMissingFinalizedTx is returned if previously withdrawn deposits
50+ // don't have a finalized withdrawal tx attached.
51+ ErrMissingFinalizedTx = errors .New ("deposit does not have a " +
52+ "finalized withdrawal tx, can't bump fee" )
53+
4954 // MinConfs is the minimum number of confirmations we require for a
5055 // deposit to be considered withdrawn.
5156 MinConfs int32 = 3
@@ -330,6 +335,14 @@ func (m *Manager) WithdrawDeposits(ctx context.Context,
330335 return "" , "" , ErrWithdrawingMixedDeposits
331336 }
332337
338+ // Ensure that all previously withdrawn deposits reference their
339+ // finalized withdrawal tx.
340+ for _ , d := range deposits {
341+ if d .FinalizedWithdrawalTx == nil {
342+ return "" , "" , ErrMissingFinalizedTx
343+ }
344+ }
345+
333346 // If republishing of an existing withdrawal is requested we
334347 // ensure that all deposits remain clustered in the context of
335348 // the same withdrawal tx. We do this by checking that they have
You can’t perform that action at this time.
0 commit comments