bitcoind: fee estimation support.

This can be used for proper support for fee negotiation; for the moment
it will be used for our anchor transaction creation.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-04-12 13:07:03 +09:30
parent 51de503096
commit e84bf16bf8
2 changed files with 61 additions and 0 deletions

View File

@@ -37,6 +37,19 @@ void bitcoind_txid_lookup_(struct lightningd_state *dstate,
const struct bitcoin_tx *), \
(arg))
void bitcoind_estimate_fee_(struct lightningd_state *dstate,
void (*cb)(struct lightningd_state *dstate,
u64, void *),
void *arg);
#define bitcoind_estimate_fee(dstate, cb, arg) \
bitcoind_estimate_fee_((dstate), \
typesafe_cb_preargs(void, void *, \
(cb), (arg), \
struct lightningd_state *, \
u64), \
(arg))
void bitcoind_send_tx(struct lightningd_state *dstate,
const struct bitcoin_tx *tx);