Browse Source

lightningd/funding_tx: output number is 16 bit.

It's actually always 0 or 1, but the spec wants 16 bits, so use that here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
b937793555
  1. 2
      lightningd/funding_tx.c
  2. 2
      lightningd/funding_tx.h
  3. 2
      lightningd/hsm/hsm.c
  4. 2
      lightningd/peer_control.c
  5. 2
      lightningd/test/run-funding_tx.c

2
lightningd/funding_tx.c

@ -13,7 +13,7 @@
#endif #endif
struct bitcoin_tx *funding_tx(const tal_t *ctx, struct bitcoin_tx *funding_tx(const tal_t *ctx,
u32 *outnum, u16 *outnum,
const struct utxo **utxomap, const struct utxo **utxomap,
u64 funding_satoshis, u64 funding_satoshis,
const struct pubkey *local_fundingkey, const struct pubkey *local_fundingkey,

2
lightningd/funding_tx.h

@ -33,7 +33,7 @@ struct utxo;
* a special case because of the P2SH inputs. * a special case because of the P2SH inputs.
*/ */
struct bitcoin_tx *funding_tx(const tal_t *ctx, struct bitcoin_tx *funding_tx(const tal_t *ctx,
u32 *outnum, u16 *outnum,
const struct utxo **utxomap, const struct utxo **utxomap,
u64 funding_satoshis, u64 funding_satoshis,
const struct pubkey *local_fundingkey, const struct pubkey *local_fundingkey,

2
lightningd/hsm/hsm.c

@ -365,7 +365,7 @@ static u8 *sign_funding_tx(const tal_t *ctx, const u8 *data)
struct bitcoin_tx *tx; struct bitcoin_tx *tx;
u8 *wscript, *msg_out; u8 *wscript, *msg_out;
secp256k1_ecdsa_signature *sig; secp256k1_ecdsa_signature *sig;
u32 outnum; u16 outnum;
size_t i; size_t i;
struct pubkey changekey; struct pubkey changekey;

2
lightningd/peer_control.c

@ -562,7 +562,7 @@ static void opening_gen_funding(struct subdaemon *opening, const u8 *resp,
{ {
u8 *msg; u8 *msg;
struct sha256_double txid; struct sha256_double txid;
u32 outnum; u16 outnum;
struct pubkey changekey; struct pubkey changekey;
peer_set_condition(fc->peer, "Created funding transaction for channel"); peer_set_condition(fc->peer, "Created funding transaction for channel");

2
lightningd/test/run-funding_tx.c

@ -49,7 +49,7 @@ int main(void)
struct utxo utxo; struct utxo utxo;
const struct utxo **utxomap = tal_arr(tmpctx, const struct utxo *, 1); const struct utxo **utxomap = tal_arr(tmpctx, const struct utxo *, 1);
u64 funding_satoshis; u64 funding_satoshis;
u32 funding_outnum; u16 funding_outnum;
u8 *subscript; u8 *subscript;
secp256k1_ecdsa_signature sig; secp256k1_ecdsa_signature sig;

Loading…
Cancel
Save