Skip to content

Conversation

@instagibbs
Copy link
Contributor

resolves #328

REJECT_INVALID, "bad-coinbase-txos");
if (chainparams.GetConsensus().mandatory_coinbase_destination != CScript()) {
BOOST_FOREACH(const CTxOut& txout, block.vtx[0]->vout) {
if (txout.scriptPubKey != chainparams.GetConsensus().mandatory_coinbase_destination && !(txout.nValue.IsExplicit() && txout.nValue.GetAmount() == 0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhmm, so if outputs are confidential or 0 it is allowed that they're sent anywhere? why?
Also shouldn't we validate that all coinbase outputs are explicit regardless of mandatory_coinbase_destination?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By consensus they can't be confidential(the check is later in VerifyCoinbaseAnounts), and you need to allow 0-value outputs for commitments, such as segwit.

@jtimon
Copy link
Contributor

jtimon commented Apr 2, 2018

utACK beyond nits.

@instagibbs instagibbs merged commit d77df82 into ElementsProject:elements-0.14.1 Apr 3, 2018
instagibbs added a commit that referenced this pull request Apr 3, 2018
d77df82 parameterize the mandatory coinbase (Gregory Sanders)
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