mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
bbed5e3411
We leave the *build* results in lightningd/ for ease of in-place testing though. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 lines
571 B
C
20 lines
571 B
C
#include <ccan/structeq/structeq.h>
|
|
#include <common/htlc_wire.h>
|
|
#include <onchaind/onchain_wire.h>
|
|
#include <wire/wire.h>
|
|
|
|
void towire_htlc_stub(u8 **pptr, const struct htlc_stub *htlc_stub)
|
|
{
|
|
towire_side(pptr, htlc_stub->owner);
|
|
towire_u32(pptr, htlc_stub->cltv_expiry);
|
|
towire_ripemd160(pptr, &htlc_stub->ripemd);
|
|
}
|
|
|
|
void fromwire_htlc_stub(const u8 **cursor, size_t *max,
|
|
struct htlc_stub *htlc_stub)
|
|
{
|
|
htlc_stub->owner = fromwire_side(cursor, max);
|
|
htlc_stub->cltv_expiry = fromwire_u32(cursor, max);
|
|
fromwire_ripemd160(cursor, max, &htlc_stub->ripemd);
|
|
}
|