You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
614 B
21 lines
614 B
7 years ago
|
#include <common/htlc_wire.h>
|
||
4 years ago
|
#include <onchaind/onchaind_wire.h>
|
||
7 years ago
|
#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);
|
||
6 years ago
|
towire_u64(pptr, htlc_stub->id);
|
||
7 years ago
|
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);
|
||
6 years ago
|
htlc_stub->id = fromwire_u64(cursor, max);
|
||
7 years ago
|
fromwire_ripemd160(cursor, max, &htlc_stub->ripemd);
|
||
|
}
|