Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add MarkDelegationAsTransitioned method #163

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

jeremy-babylonlabs
Copy link
Contributor

@jeremy-babylonlabs jeremy-babylonlabs commented Dec 1, 2024

closes #102

  • Implemented MarkDelegationAsTransitioned method in V1Database to mark delegations as transitioned in the db.
  • Updated V1DBClient interface to include the new method.
  • Modified DelegationDocument and DelegationPublic structures to include a transitioned field.
  • Added logic in V2Service to check and mark V1 delegations as transitioned during active staking handling.

- Implemented MarkDelegationAsTransformed method in V1Database to mark delegations as transformed in the db.
- Updated V1DBClient interface to include the new method.
- Modified DelegationDocument and DelegationPublic structures to include a Transformed field.
- Added logic in V2Service to check and mark V1 delegations as transformed during active staking handling.
- Updated mock implementations for V1DBClient to support the new method.
internal/v1/db/model/delegation.go Outdated Show resolved Hide resolved
internal/v2/queue/handler/staking.go Outdated Show resolved Hide resolved
@jeremy-babylonlabs jeremy-babylonlabs force-pushed the 102-mark-phase-1-delegation-transformed branch from db71897 to 9355422 Compare December 3, 2024 05:55
@jeremy-babylonlabs jeremy-babylonlabs changed the title feat: add MarkDelegationAsTransformed method feat: add MarkDelegationAsTransitioned method Dec 3, 2024
return nil, err
}

update := bson.M{"$set": bson.M{"transitioned": true}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wont' this be is_transitioned as per the model?

@jeremy-babylonlabs jeremy-babylonlabs merged commit 918d24a into main Dec 3, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark phase-1 delegation transformed
3 participants