Skip to content

Conversation

@instagibbs
Copy link
Contributor

@instagibbs instagibbs commented Apr 13, 2017

Previous logic, aside from allowing 0-fee outputs, was completely duplicated in other sections of the code.

The value-checking of outputs is already done in CheckTransaction, VerifyAmounts and VerifyCoinbaseAmount, so no need to check again in another context.

I can not recall why we disallowed 0-value fees initially, but the new logic is cleaner since we now always allow 0-value outputs as long as they're IsUnspendable, which fees are a smaller subset of.

I have also added more tests.

@instagibbs instagibbs changed the title [HF] Fee logic cleanup, allow 0-value fees [HF] Fee output logic cleanup, allow 0-value fees Apr 13, 2017
@instagibbs instagibbs merged commit ebf836d into ElementsProject:elements-0.13.1 Jun 15, 2017
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.

1 participant