htlc_wire: marshal/unmarshal shachain object.

We want to hand it to onchaind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-08-18 14:13:52 +09:30
parent aa23a2a93f
commit a4f290daba
2 changed files with 37 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
#include <lightningd/sphinx.h>
#include <wire/gen_onion_wire.h>
struct shachain;
/* These are how we communicate about HTLC state to the master daemon */
struct added_htlc {
u64 id;
@@ -38,6 +40,7 @@ void towire_failed_htlc(u8 **pptr, const struct failed_htlc *failed);
void towire_changed_htlc(u8 **pptr, const struct changed_htlc *changed);
void towire_htlc_state(u8 **pptr, const enum htlc_state hstate);
void towire_side(u8 **pptr, const enum side side);
void towire_shachain(u8 **pptr, const struct shachain *shachain);
void fromwire_added_htlc(const u8 **cursor, size_t *max,
struct added_htlc *added);
@@ -49,4 +52,6 @@ void fromwire_changed_htlc(const u8 **cursor, size_t *max,
struct changed_htlc *changed);
enum htlc_state fromwire_htlc_state(const u8 **cursor, size_t *max);
enum side fromwire_side(const u8 **cursor, size_t *max);
void fromwire_shachain(const u8 **cursor, size_t *max,
struct shachain *shachain);
#endif /* LIGHTNING_LIGHTNINGD_HTLC_WIRE_H */