signing segwit change output typo

This commit is contained in:
Tomas Susanka 2017-11-24 12:35:16 +01:00 committed by Pavol Rusnak
parent 723cf295a7
commit cfe8a98c68
1 changed files with 3 additions and 0 deletions

View File

@ -552,6 +552,9 @@ static bool signing_check_output(TxOutputType *txoutput) {
}
/*
* only allow segwit change if amount is smaller than what segwit inputs paid.
* this was added during the times segwit was not yet fully activated
* to make sure the user is not tricked to use witness change output
* instead of regular one therefore creating ANYONECANSPEND output
*/
if ((txoutput->script_type == OutputScriptType_PAYTOWITNESS
|| txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS)