Fix errors on round finalization (#199)

* Fix ListConnectorUtxos

* Fix

* Fix

* Add log

* Store current round in memoory and drop GetCurrentRound repo api

* Skip lint
This commit is contained in:
Pietralberto Mazza
2024-07-08 14:22:35 +02:00
committed by GitHub
parent c274d670fe
commit d10c724ced
6 changed files with 35 additions and 89 deletions

View File

@@ -50,20 +50,6 @@ func (r *roundRepository) AddOrUpdateRound(
return r.addOrUpdateRound(ctx, round)
}
func (r *roundRepository) GetCurrentRound(
ctx context.Context,
) (*domain.Round, error) {
query := badgerhold.Where("Stage.Ended").Eq(false).And("Stage.Failed").Eq(false)
rounds, err := r.findRound(ctx, query)
if err != nil {
return nil, err
}
if len(rounds) <= 0 {
return nil, fmt.Errorf("ongoing round not found")
}
return &rounds[0], nil
}
func (r *roundRepository) GetRoundWithId(
ctx context.Context, id string,
) (*domain.Round, error) {