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

mining: Correct priority calcs for Decred sizes. #1967

Merged
merged 3 commits into from
Oct 27, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 26, 2019

This requires #1966.

This changes the overhead value used when calculating transaction priorities for mining to the correct value for Decred transaction sizes and adds tests to ensure the priority calculation produces the expected values. In order to accomplish this, it introduces a mock priority input source which implements the newly introduced PriorityInputser interface.

This introduces a new interface named PriorityInputser and updates the
functions that currently take a pointer to a blockchain.UtxoViewpoint
struct to accept the interface instead.

This removes the tight coupling between the two packages at the API
boundary and allows callers to easily provide custom values if desired.

It also updates the blockchain.UtxoViewpoint struct to implement the
interface.
This changes the overhead value used when calculating transaction
priorities for mining to the correct value for Decred transaction sizes.
This adds tests to ensure the priority calculation produces the expected
values.  In order to accomplish this, it introduces a mock priority
input source which implements the newly introduced PriorityInputser
interface.
@davecgh davecgh added this to the 1.6.0 milestone Oct 26, 2019
@davecgh davecgh merged commit 073ed91 into decred:master Oct 27, 2019
@davecgh davecgh deleted the mining_correct_priority_calc branch October 27, 2019 02:40
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.

2 participants