mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 01:50:03 +01:00
c00c0dd7bc
This commit adds the interactive transaction construction protcol, as well as the first practical example of using it, v2 of channel establishment. Note that for v2 we also update the channel_id, which now uses the hash of the revocation_basepoints. We move away from using the funding transaction id, as the introduction of RBF* makes it such that a single channel may have many funding transaction id's over the course of its lifetime. *Later, also splicing
83 lines
2.2 KiB
Bash
Executable File
83 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# spellcheck.sh
|
|
# by ZmnSCPxj
|
|
# Simple script to spellcheck files.
|
|
#
|
|
# ZmnSCPxj puts this script into the public domain.
|
|
|
|
set -e
|
|
|
|
# Check if dirname works.
|
|
if (test_dir=`dirname -- /` && test "X"$test_dir = "X/")
|
|
then
|
|
my_dirname=dirname
|
|
else
|
|
my_dirname=false
|
|
fi
|
|
|
|
# Find the path to this script.
|
|
# We assume sed works on most systems, since it's very old.
|
|
my_dir=`$my_dirname -- "$0" ||
|
|
echo X"$0" |
|
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
s//\1/
|
|
q
|
|
}
|
|
/^X\(\/\/\)[^/].*/{
|
|
s//\1/
|
|
q
|
|
}
|
|
/^X\(\/\/\)$/{
|
|
s//\1/
|
|
q
|
|
}
|
|
/^X\(\/\).*/{
|
|
s//\1/
|
|
q
|
|
}
|
|
s/.*/./; q'`
|
|
|
|
# This script should be in the tools/ directory of the
|
|
# repository.
|
|
homedir="$my_dir"/..
|
|
|
|
if [ x"$1" = x"--check" ]; then
|
|
CHECK=1
|
|
shift
|
|
fi
|
|
|
|
for f
|
|
do
|
|
if [ -n "$CHECK" ]; then
|
|
# Eliminate the following:
|
|
# Inline references eg. [Use of segwit](#use-of-segwit)
|
|
# Code blocks using ```
|
|
# quoted identifiers eg. `htlc_id`
|
|
# field descriptions, eg. `* [`num_htlcs*64`:`htlc_signature]'
|
|
# indented field names, eg. ' `num_htlcs`: 0'
|
|
# lightning addresses, eg. `lnbc1qpvj6chq...`
|
|
# BIP 173 addresses, eg. `bc1qpvj6chq...`
|
|
# Short hex strings, eg '0x2bb038521914 12'
|
|
# long hex strings
|
|
# long base58 strings
|
|
WORDS=$(sed -e 's/ [lL][nN]\([bB][cC]\|[tT][bB]\)[0-9munpxMUNP]*1[qpzry9x8gf2tvdw0s3jn54khce6mua7lQPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]\+//g' \
|
|
-e 's/\]([-#a-zA-Z0-9_.]*)//g' \
|
|
-e '/^```/,/^```/d' \
|
|
-e 's/`[a-zA-Z0-9_]*`//g' \
|
|
-e 's/\* \[`[_a-z0-9*]\+`://g' \
|
|
-e 's/0x[a-fA-F0-9 ]\+//g' \
|
|
-e 's/[a-fA-F0-9]\{20,\}//g' \
|
|
-e 's/^ .*_htlcs//g' \
|
|
-e 's/ ln\(bc\|tb\)[0-9munp]*1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]\+//g' \
|
|
-e 's/ \(bc\|tb\|bcrt\)1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]\+//g' \
|
|
-e 's/pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpquwpc4curk03c9wlrswe78q4eyqc7d8d0xqzpuyk0sg5g70me25alkluzd2x62aysf2pyy8edtjeevuv4p2d5p76r4zkmneet7uvyakky2zr4cusd45tftc9c5fh0nnqpnl2jfll544esqchsrny//' \
|
|
-e 's/[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]\{20,\}//g' < $f | tee /tmp/`basename $f`.aspell | aspell -l en_US --home-dir ${homedir} list)
|
|
if [ -n "$WORDS" ]; then
|
|
echo Misspelled words in $f: $WORDS >&2
|
|
exit 1
|
|
fi
|
|
else
|
|
aspell -l en_US --home-dir ${homedir} -c $f
|
|
fi
|
|
done
|