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

Planner tests: Delegate action #1840

Open
Tracked by #691
grod220 opened this issue Oct 4, 2024 · 0 comments
Open
Tracked by #691

Planner tests: Delegate action #1840

grod220 opened this issue Oct 4, 2024 · 0 comments
Labels
testing Related to writing tests

Comments

@grod220
Copy link
Collaborator

grod220 commented Oct 4, 2024

Write tests for delegation action:

for tpr::Delegate { amount, rate_data } in request.delegations {
let epoch = storage.get_latest_known_epoch().await?.unwrap();
let amount = amount
.ok_or_else(|| anyhow!("missing amount in delegation"))?
.try_into()?;
let rate_data: RateData = rate_data
.ok_or_else(|| anyhow!("missing rate data in delegation"))?
.try_into()?;
let delegate = rate_data.build_delegate(epoch.into(), amount);
actions_list.push(delegate);
}

@grod220 grod220 added the testing Related to writing tests label Oct 4, 2024
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra web Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to writing tests
Projects
Status: 🗄️ Backlog
Development

No branches or pull requests

1 participant