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

Use nano::test::make_final_vote() instead of manually constructing final votes in unit tests #4402

Closed
dsiganos opened this issue Jan 26, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted unit test Related to a new, changed or fixed unit test

Comments

@dsiganos
Copy link
Contributor

dsiganos commented Jan 26, 2024

Replace final votes construction of the type:

auto vote (std::make_shared<nano::vote> (nano::dev::genesis_key.pub, nano::dev::genesis_key.prv, nano::vote::timestamp_max, nano::vote::duration_max, std::vector<nano::block_hash> (1, send->hash ())));

with:

nano::test:make_final_vote(nano::dev::genesis_key, { send });

Be careful, we have many types of votes, only replace the final vote generation in this task to keep the change easily reviewable.
There should roughly 10 instances of it.

@RickiNano
Copy link
Contributor

I'm working on this

RickiNano added a commit to RickiNano/nano-node that referenced this issue Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

No branches or pull requests

2 participants