daemon/watch: API to watch various bitcoin transactions.

This uses the functions in bitcoind to provide callbacks when various
things happen.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:49 +10:30
parent 5ec8ff91e4
commit e9237f94b1
7 changed files with 347 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
#ifndef LIGHTNING_DAEMON_PEER_H
#define LIGHTNING_DAEMON_PEER_H
#include "config.h"
#include "bitcoin/pubkey.h"
#include "lightning.pb-c.h"
#include "netaddr.h"
#include <ccan/list/list.h>
@@ -26,6 +27,9 @@ struct peer {
/* What happened. */
struct log *log;
/* Things we're watching for (see watches.c) */
struct list_head watches;
/* Keys for transactions with this peer. */
struct pubkey their_commitkey, their_finalkey;