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

mempool: Accept test mungers for create signed tx. #1576

Merged
merged 1 commit into from
Jan 28, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jan 26, 2019

This modifies CreateSignedTx in the mempool test harness to accept munge functions similar to how NextBlock in chaingen works and updates the callers accordingly. This allows the test code to more easily mutate the transactions as desired prior to them being signed which provides greater flexibility.

While here, it also sets the input amount to the proper value in the generated transaction. While there is not currently anything in the tests that relies on that value being accurate, it is more desirable to create transactions in the test code which are fully valid in case they end up being used where it does matter in future tests.

Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

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

ok

This modifies CreateSignedTx in the mempool test harness to accept munge
functions similar to how NextBlock in chaingen works and updates the
callers accordingly.  This allows the test code to more easily mutate
the transactions as desired prior to them being signed which provides
greater flexibility.

While here, it also sets the input amount to the proper value in the
generated transaction.  While there is not currently anything in the
tests that relies on that value being accurate, it is more desirable to
create transactions in the test code which are fully valid in case they
end up being used where it does matter in future tests.
@davecgh davecgh force-pushed the mempool_accept_mungers_oncstx branch from df84fbd to 385890d Compare January 28, 2019 14:23
@davecgh davecgh merged commit 385890d into decred:master Jan 28, 2019
@davecgh davecgh deleted the mempool_accept_mungers_oncstx branch January 28, 2019 15:12
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.

6 participants