mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-31 19:14:43 +01:00
test-cli: use OpenChannel__AnchorOffer instead of book for open_channel_pkt()
Clearer by being more explicit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
08367f8716
commit
2516a187bc
@ -84,8 +84,11 @@ int main(int argc, char *argv[])
|
|||||||
revocation_hash.u.u8, sizeof(revocation_hash.u.u8));
|
revocation_hash.u.u8, sizeof(revocation_hash.u.u8));
|
||||||
|
|
||||||
pkt = open_channel_pkt(ctx, &revocation_hash, &commitkey, &finalkey,
|
pkt = open_channel_pkt(ctx, &revocation_hash, &commitkey, &finalkey,
|
||||||
locktime_seconds, offer_anchor, min_confirms,
|
locktime_seconds,
|
||||||
commit_tx_fee);
|
offer_anchor
|
||||||
|
? OPEN_CHANNEL__ANCHOR_OFFER__WILL_CREATE_ANCHOR
|
||||||
|
: OPEN_CHANNEL__ANCHOR_OFFER__WONT_CREATE_ANCHOR,
|
||||||
|
min_confirms, commit_tx_fee);
|
||||||
|
|
||||||
if (!write_all(STDOUT_FILENO, pkt, pkt_totlen(pkt)))
|
if (!write_all(STDOUT_FILENO, pkt, pkt_totlen(pkt)))
|
||||||
err(1, "Writing out packet");
|
err(1, "Writing out packet");
|
||||||
|
@ -36,7 +36,7 @@ struct pkt *open_channel_pkt(const tal_t *ctx,
|
|||||||
const struct pubkey *commit,
|
const struct pubkey *commit,
|
||||||
const struct pubkey *final,
|
const struct pubkey *final,
|
||||||
u32 rel_locktime_seconds,
|
u32 rel_locktime_seconds,
|
||||||
bool offer_anchor,
|
OpenChannel__AnchorOffer offer_anchor,
|
||||||
u32 min_depth,
|
u32 min_depth,
|
||||||
u64 commitment_fee)
|
u64 commitment_fee)
|
||||||
{
|
{
|
||||||
@ -50,10 +50,9 @@ struct pkt *open_channel_pkt(const tal_t *ctx,
|
|||||||
lt.seconds = rel_locktime_seconds;
|
lt.seconds = rel_locktime_seconds;
|
||||||
o.delay = <
|
o.delay = <
|
||||||
o.commitment_fee = commitment_fee;
|
o.commitment_fee = commitment_fee;
|
||||||
if (offer_anchor)
|
o.anch = offer_anchor;
|
||||||
o.anch = OPEN_CHANNEL__ANCHOR_OFFER__WILL_CREATE_ANCHOR;
|
assert(o.anch == OPEN_CHANNEL__ANCHOR_OFFER__WILL_CREATE_ANCHOR
|
||||||
else
|
|| o.anch == OPEN_CHANNEL__ANCHOR_OFFER__WONT_CREATE_ANCHOR);
|
||||||
o.anch = OPEN_CHANNEL__ANCHOR_OFFER__WONT_CREATE_ANCHOR;
|
|
||||||
|
|
||||||
o.min_depth = min_depth;
|
o.min_depth = min_depth;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ struct pkt *open_channel_pkt(const tal_t *ctx,
|
|||||||
const struct pubkey *commit,
|
const struct pubkey *commit,
|
||||||
const struct pubkey *final,
|
const struct pubkey *final,
|
||||||
u32 rel_locktime_seconds,
|
u32 rel_locktime_seconds,
|
||||||
bool offer_anchor,
|
OpenChannel__AnchorOffer offer_anchor,
|
||||||
u32 min_depth,
|
u32 min_depth,
|
||||||
u64 commitment_fee);
|
u64 commitment_fee);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user