mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
Add integration tests for sweeping rounds (#339)
* add "block" scheduler type + sweep integration test * increase timeout in integrationtests * remove config logs * rename scheduler package name * rename package * rename packages
This commit is contained in:
@@ -177,7 +177,7 @@ func (s *covenantService) SpendVtxos(ctx context.Context, inputs []ports.Input)
|
||||
return "", fmt.Errorf("failed to parse tx %s: %s", input.Txid, err)
|
||||
}
|
||||
|
||||
confirmed, blocktime, err := s.wallet.IsTransactionConfirmed(ctx, input.Txid)
|
||||
confirmed, _, blocktime, err := s.wallet.IsTransactionConfirmed(ctx, input.Txid)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to check tx %s: %s", input.Txid, err)
|
||||
}
|
||||
@@ -910,12 +910,10 @@ func (s *covenantService) scheduleSweepVtxosForRound(round *domain.Round) {
|
||||
return
|
||||
}
|
||||
|
||||
expirationTimestamp := time.Now().Add(
|
||||
time.Duration(s.roundLifetime+30) * time.Second,
|
||||
)
|
||||
expirationTime := s.sweeper.scheduler.AddNow(s.roundLifetime)
|
||||
|
||||
if err := s.sweeper.schedule(
|
||||
expirationTimestamp.Unix(), round.Txid, round.CongestionTree,
|
||||
expirationTime, round.Txid, round.CongestionTree,
|
||||
); err != nil {
|
||||
log.WithError(err).Warn("failed to schedule sweep tx")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user