Page MenuHomePhabricator

Update CTxMemPoolEntry and BlockAssembler to billing cutoffs
AbandonedPublic

Authored by schancel on Jul 19 2018, 20:18.

Details

Reviewers
jasonbcox
Group Reviewers
Restricted Project
Summary

Add nBillableSizeWithDescendants and nBillableSizeWithAncestors to
CTxMempoolEntry to allow CBlockAssembler to mine transactions based
on fees calculated using the billable size of a package.

Test Plan
make check && ./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
mine-billing
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3004
Build 4101: Bitcoin ABC Buildbot (legacy)
Build 4100: arc lint + arc unit

Event Timeline

jasonbcox requested changes to this revision.Jul 20 2018, 05:10
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/txmempool.cpp
331 ↗(On Diff #4359)

I noticed Amaury has been migrating code to use the more modern function-call style casting. I think it reads better, so please do that here and the line immediately above this one. Like -int64_t(removeIt->GetBillableSize());

397 ↗(On Diff #4359)

int -> int64_t

402 ↗(On Diff #4359)

Nit: Looks like this should be int64_t as well?

src/validation.h
59 ↗(On Diff #4359)

This is per kB right? Please clarify the comment to reflect that.

test/functional/bip68-sequence.py
298 ↗(On Diff #4359)

Looks like this may have been dependent on your other diff. Please correct that there if it's not landed already.

This revision now requires changes to proceed.Jul 20 2018, 05:10
schancel added inline comments.
src/txmempool.cpp
331 ↗(On Diff #4359)

Good patch. I copy and pasted the code without noticing that.

test/functional/bip68-sequence.py
298 ↗(On Diff #4359)

Yeah I caught it and fixed it. I still have a few other things to deal with though.

src/txmempool.cpp
397 ↗(On Diff #4359)

Crap, good catch.

402 ↗(On Diff #4359)

We shouldn't have that many sigops.

Fix package fee modification during mining