-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add fn add_fee_input()
and make fn add_random_fee_input()
truly random
#829
Conversation
} | ||
|
||
#[cfg(feature = "rand")] | ||
pub fn add_fee_input(&mut self) -> &mut Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be simply
self.add_rnadom_fee_input(rand::rngs::StdRng::seed_from_u64(2322u64))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would work. Since it's not critical, I'll consider updating this part with next PR to fuel-vm
.
one minor comment, but otherwise LGTM |
@rafal-ch This change is breaking, so it should modify the changelog |
I created a follow-up PR: #836 |
Previously the
add_random_fee_input()
wasn't actually producing a random input, which was confusing. This PR:add_fee_input()
which is an equivalent to the former version ofadd_random_fee_input()
add_random_fee_input()
to accept anrng
and provide truly random fee inputFor compatibility reasons, all tests that were previously using
add_random_fee_input()
were modified to useadd_fee_input()
.This change should make the test code more explicit and make it easier to create random transactions in test code.
Before requesting review
Follow-up draft PR in
fuel-core
: FuelLabs/fuel-core#2211