sipa / bitcoin

Bitcoin integration/staging tree
http://www.bitcoin.org
MIT License
88 stars 21 forks source link

RFC: bitcoinconsensus.h: Introduce new function to accept UTXO amount #47

Closed afk11 closed 8 years ago

afk11 commented 8 years ago

This adds an error bitcoinconsensus_ERR_AMOUNT_REQUIRED, when bitcoinconsensus_verify_script is called with the witness bit set. Normal usage will feed the amount 0 into VerifyScript.

Adds bitcoinconsensus_verify_with_amount(), which takes the usual arguments and the amount.

To facilitate future changes, I've added a static function to accept all parameters and flags. Also bumps the version constant (exposed via bitcoinconsensus_version())

I modified a test which touched this function also:

sipa commented 8 years ago

Can you squash?

afk11 commented 8 years ago

Done

sipa commented 8 years ago

Merging.