check for return code in the else block

This commit is contained in:
Yash Bhutwala 2019-10-06 18:25:23 -04:00 committed by neil saitug
parent 68222ddc7b
commit 30ec739c15

View File

@ -42,6 +42,7 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script,
} else { } else {
ret = wally_tx_output_init_alloc(satoshis, script, ret = wally_tx_output_init_alloc(satoshis, script,
tal_bytelen(script), &output); tal_bytelen(script), &output);
assert(ret == WALLY_OK);
} }
ret = wally_tx_add_output(tx->wtx, output); ret = wally_tx_add_output(tx->wtx, output);
assert(ret == WALLY_OK); assert(ret == WALLY_OK);