-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Consensus: Policy: Move CFeeRate out of consensus module and create CPolicy interface #7820
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
Conversation
|
concept ACK |
71ffeaa to
1e614c8
Compare
|
Rebased(1). |
1e614c8 to
eac77cd
Compare
e167f6f to
9dd9bc0
Compare
|
Rebased and fixed one error, but it is still failing. |
|
Concept ACK will review, can you check the failing travis ? |
|
I'm sorry, after sewgit's rebase this did never passed travis (but this time I removed the known past mistakes, so it's weird). That;s why I suggested master...jtimon:0.13-consensus-dust-out-minimal which seems to work (locally). The travis error seemed related to CAmount becoming undefined for windows, but on the last push it also failed in another build. |
|
EDIT: needed rebased and rebased master...jtimon:0.13-consensus-dust-out-minimal |
9dd9bc0 to
e3acf59
Compare
d796cab to
c65eff1
Compare
c65eff1 to
a543bce
Compare
...from amount.o to policy/feerate.o Policy, because it moves policy code to the policy directory (common module)
…RelayTxFee Therefore the default value before init::AppInit2() is being used always.
…icy::InitFromArgs()
…from CTxOut to CPolicy Consensus, because it moves non-consensus code out of the consensus module Policy, because it moves policy code to the policy directory (server module) Method Renames: - s/CTxOut::GetDustThreshold(const CFeeRate&)/CDefaultPolicy::GetDustThreshold(const CTxOut&)/ - s/CTxOut::IsDust(const CFeeRate&)/CDefaultPolicy::AcceptDust(const CTxOut&)/
…() and use it everywhere except for dust
a543bce to
daabe73
Compare
This moves the CFeeRate and dust code out of libconsensus and the consensus module.
Before that, it prepares an empty CPolicy interface and implementation where the dust methods are moved to. It also encapsulates the global minRelayTxFee behind the CPolicy interface.
Since this may be too disruptive for one PR, I was very careful to separate things in smaller commits.
The first commit, for example, may be useful for @jonasschnelli 's work encapsulating the wallet.
This is also intended to replace @morcos' #7557, #6068 and #5114.