-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Provide fee data for all txs in RPC getblocktemplate response #2115
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
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/d42d932bed6b564cbfc00216d1c04cd5248ddeef for binaries and test log. |
entry.push_back(Pair("fee", (int64_t)(tx.GetValueIn(view) - tx.GetValueOut()))); | ||
nSigOps += tx.GetP2SHSigOpCount(view); | ||
} | ||
assert(tx.HaveInputs(view)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the possibility of bitcoind just aborting. Is there some reason not to make this an if() block as a failsafe?
I think it would be better to have CreateNewBlock construct some meta-data object with fees in it, which can be used by getblocktemplate. EDIT: this definitely needs fixing of course, but it seems silly to have GBT redo the fee calculation in an incomplete way, when CreateNewBlock perfectly knows all fees. |
No reason it can't be optimized after merging this fix, IMO. |
/me is working on having CreateNewBlock return fee data in addition |
Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/3a291f97f0dc1c98f980a3f5679000339416961f for binaries and test log. This could happen for one of several reasons:
|
…des per-tx fee and sigop count data
…rectly) calculating it ourselves
Okay, CreateNewBlock now returns a CBlockTemplate struct that contains the block and fee and sigop data. |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/0f927ceb5b90ec02be36ddb20b2f4cff82589265 for binaries and test log. |
Code looks good to me. I'll do some testing soon. |
ACK |
Been running this for almost two weeks on a node. Did basic sanity checks. ACK. |
ACK |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f3d872d1eabeb5c999162f709626ee20c8789c42 for binaries and test log. |
Provide fee data for all txs in RPC getblocktemplate response
Provide fee data for all txs in RPC getblocktemplate response
Having the fee data for every transaction returned by "getblocktemplate" was broken by the ultraprune commit (450cbb0). It made it so transactions that depend on other transactions in the block-to-be don't have fee data.