Page MenuHomePhabricator

Use a modified size for transaction minimum fee calculation.
AbandonedPublic

Authored by schancel on Jun 7 2018, 05:18.

Details

Reviewers
jasonbcox
deadalnix
Group Reviewers
Restricted Project
Summary

Currently, we use the full transaction size for a minimum fee calculation.
This commit changes the behavior to charge for the additional (minimum) of
179 bytes it would take to spend any newly created outputs.

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
arcpatch-D1486
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2905
Build 3914: Bitcoin ABC Buildbot (legacy)
Build 3913: arc lint + arc unit

Event Timeline

jasonbcox requested changes to this revision.Jun 8 2018, 23:26

Everything else looks good. I assume the reason you aren't merging in D1480 is that that particular change fails tests and may be it's own can of worms, yes?

src/test/transaction_tests.cpp
768–769 ↗(On Diff #4084)

I'm finding this hard to read with the short names. Please do (or similar):
bs -> billableSize
s -> size

This revision now requires changes to proceed.Jun 8 2018, 23:26
src/txmempool.cpp
897 ↗(On Diff #4084)

The previous GetTxSize() cached the size internally to the mempool entry. This does not. I am curious as to if I should make the mempool entry cache this data.

Address feeback about tests

I still need to add caching for the billing size.

Fix up the commit to properly cache billable size result

jasonbcox added inline comments.
src/wallet/wallet.cpp
2921 ↗(On Diff #4155)

remove second space after // the

This revision is now accepted and ready to land.Jun 25 2018, 17:08

Include billable_size in this diff

jasonbcox added inline comments.
src/primitives/transaction.cpp
114 ↗(On Diff #4420)

change -> charge?