mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
protocol: move locktime into its own message type.
We're going to want this for HTLC times, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
6
pkt.c
6
pkt.c
@@ -41,12 +41,14 @@ struct pkt *open_channel_pkt(const tal_t *ctx,
|
||||
u64 commitment_fee)
|
||||
{
|
||||
OpenChannel o = OPEN_CHANNEL__INIT;
|
||||
Locktime lt = LOCKTIME__INIT;
|
||||
|
||||
o.revocation_hash = sha256_to_proto(ctx, revocation_hash);
|
||||
o.commit_key = pubkey_to_proto(ctx, commit);
|
||||
o.final_key = pubkey_to_proto(ctx, final);
|
||||
o.locktime_case = OPEN_CHANNEL__LOCKTIME_LOCKTIME_SECONDS;
|
||||
o.locktime_seconds = rel_locktime_seconds;
|
||||
lt.locktime_case = LOCKTIME__LOCKTIME_SECONDS;
|
||||
lt.seconds = rel_locktime_seconds;
|
||||
o.locktime = <
|
||||
o.commitment_fee = commitment_fee;
|
||||
if (offer_anchor)
|
||||
o.anch = OPEN_CHANNEL__ANCHOR_OFFER__WILL_CREATE_ANCHOR;
|
||||
|
||||
Reference in New Issue
Block a user