bitcoind: use fundrawtransaction rather than sendtoaddress and -nowalletbroadcast

Luke-Jr points out this is the Right Way to do these things.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-04-11 16:40:53 +09:30
parent 587cda0ab8
commit 95340aa03f
4 changed files with 159 additions and 58 deletions

View File

@@ -40,13 +40,13 @@ void bitcoind_txid_lookup_(struct lightningd_state *dstate,
void bitcoind_send_tx(struct lightningd_state *dstate,
const struct bitcoin_tx *tx);
void bitcoind_create_payment(struct lightningd_state *dstate,
const char *addr,
u64 satoshis,
void (*cb)(struct lightningd_state *dstate,
const struct bitcoin_tx *tx,
struct peer *peer),
struct peer *peer);
void bitcoind_fund_transaction(struct lightningd_state *dstate,
struct bitcoin_tx *tx_no_inputs,
void (*cb)(struct lightningd_state *dstate,
const struct bitcoin_tx *tx,
int change_output,
struct peer *peer),
struct peer *peer);
void bitcoind_get_mediantime(struct lightningd_state *dstate,
const struct sha256_double *blockid,