Browse Source

spelling: Check LockTime Verify.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.2rc1
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
ad2519a6f4
  1. 2
      lightningd/htlc_end.c
  2. 4
      lightningd/options.c
  3. 2
      tests/test_misc.py
  4. 5
      tools/check-spelling.sh

2
lightningd/htlc_end.c

@ -152,7 +152,7 @@ struct htlc_out *htlc_out_check(const struct htlc_out *hout,
" less than %"PRIu64, " less than %"PRIu64,
hout->in->msatoshi, hout->msatoshi); hout->in->msatoshi, hout->msatoshi);
if (hout->in->cltv_expiry <= hout->cltv_expiry) if (hout->in->cltv_expiry <= hout->cltv_expiry)
return corrupt(abortstr, "Input ctlv_expiry %u" return corrupt(abortstr, "Input cltv_expiry %u"
" less than %u", " less than %u",
hout->in->cltv_expiry, hout->cltv_expiry); hout->in->cltv_expiry, hout->cltv_expiry);
if (!sha256_eq(&hout->in->payment_hash, &hout->payment_hash)) if (!sha256_eq(&hout->in->payment_hash, &hout->payment_hash))

4
lightningd/options.c

@ -316,10 +316,10 @@ static void config_register_opts(struct lightningd *ld)
"Percentage of fee to request for their commitment"); "Percentage of fee to request for their commitment");
opt_register_arg("--cltv-delta", opt_set_u32, opt_show_u32, opt_register_arg("--cltv-delta", opt_set_u32, opt_show_u32,
&ld->config.cltv_expiry_delta, &ld->config.cltv_expiry_delta,
"Number of blocks for ctlv_expiry_delta"); "Number of blocks for cltv_expiry_delta");
opt_register_arg("--cltv-final", opt_set_u32, opt_show_u32, opt_register_arg("--cltv-final", opt_set_u32, opt_show_u32,
&ld->config.cltv_final, &ld->config.cltv_final,
"Number of blocks for final ctlv_expiry"); "Number of blocks for final cltv_expiry");
opt_register_arg("--commit-time=<millseconds>", opt_register_arg("--commit-time=<millseconds>",
opt_set_u32, opt_show_u32, opt_set_u32, opt_show_u32,
&ld->config.commit_time_ms, &ld->config.commit_time_ms,

2
tests/test_misc.py

@ -291,7 +291,7 @@ def test_htlc_in_timeout(node_factory, bitcoind, executor):
# l1 will disconnect and not reconnect. # l1 will disconnect and not reconnect.
l1.daemon.wait_for_log('dev_disconnect: -WIRE_REVOKE_AND_ACK') l1.daemon.wait_for_log('dev_disconnect: -WIRE_REVOKE_AND_ACK')
# Deadline HTLC expiry minus 1/2 cltv-expiry delta (rounded up) (== cltv - 3). ctlv is 5+1. # Deadline HTLC expiry minus 1/2 cltv-expiry delta (rounded up) (== cltv - 3). cltv is 5+1.
bitcoind.generate_block(2) bitcoind.generate_block(2)
assert not l2.daemon.is_in_log('hit deadline') assert not l2.daemon.is_in_log('hit deadline')
bitcoind.generate_block(1) bitcoind.generate_block(1)

5
tools/check-spelling.sh

@ -5,3 +5,8 @@ if git --no-pager grep -nHiE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihg
echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word." echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word."
exit 1 exit 1
fi fi
if git --no-pager grep -nHiE 'ctlv' -- . ':!tools/check-spelling.sh'; then
echo "It's check lock time verify, not check time lock verify!" >&2
exit 1
fi

Loading…
Cancel
Save