mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
bitcoind: getrawblock helper.
It turns out using the verbose=false parameter, you can get the raw block from getblock. Do that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -10,6 +10,7 @@ struct lightningd_state;
|
||||
struct ripemd160;
|
||||
struct bitcoin_tx;
|
||||
struct peer;
|
||||
struct bitcoin_block;
|
||||
/* -datadir arg for bitcoin-cli. */
|
||||
extern char *bitcoin_datadir;
|
||||
|
||||
@@ -121,6 +122,20 @@ void bitcoind_getblockhash_(struct lightningd_state *dstate,
|
||||
const struct sha256_double *), \
|
||||
(arg))
|
||||
|
||||
void bitcoind_getrawblock_(struct lightningd_state *dstate,
|
||||
const struct sha256_double *blockid,
|
||||
void (*cb)(struct lightningd_state *dstate,
|
||||
struct bitcoin_block *blk,
|
||||
void *arg),
|
||||
void *arg);
|
||||
#define bitcoind_getrawblock(dstate, blkid, cb, arg) \
|
||||
bitcoind_getrawblock_((dstate), (blkid), \
|
||||
typesafe_cb_preargs(void, void *, \
|
||||
(cb), (arg), \
|
||||
struct lightningd_state *, \
|
||||
struct bitcoin_block *), \
|
||||
(arg))
|
||||
|
||||
void normalized_txid(const struct bitcoin_tx *tx, struct sha256_double *txid);
|
||||
|
||||
void check_bitcoind_config(struct lightningd_state *dstate);
|
||||
|
||||
Reference in New Issue
Block a user