|
@ -10,9 +10,10 @@ static u32 find_output(const struct bitcoin_tx *tx, const u8 *scriptpubkey) |
|
|
u32 i; |
|
|
u32 i; |
|
|
|
|
|
|
|
|
for (i = 0; i < tx->output_count; i++) { |
|
|
for (i = 0; i < tx->output_count; i++) { |
|
|
if (tx->output[i].script_length != tal_count(scriptpubkey)) |
|
|
if (scripteq(tx->output[i].script, |
|
|
continue; |
|
|
tx->output[i].script_length, |
|
|
if (memcmp(tx->output[i].script, scriptpubkey, tal_count(scriptpubkey)) == 0) |
|
|
scriptpubkey, |
|
|
|
|
|
tal_count(scriptpubkey))) |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
/* FIXME: Return failure! */ |
|
|
/* FIXME: Return failure! */ |
|
|