2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-18 21:28:03 +00:00

Merge pull request #70 from practicalswift/end-of-sentence

travis: Add linter to detect incorrect capitalisation, or when the end of a sentence is not on the same line as the beginning of the sentence
This commit is contained in:
Andreas M. Antonopoulos 2019-09-28 10:20:34 -04:00 committed by GitHub
commit 6be13e040e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 18 deletions

View File

@ -17,4 +17,5 @@ script:
- git grep -iE '(^| )(\w+) \2(\.|,|:|;| |$)' -- "*.asciidoc" "*.md" && echo "^ Detected lexical illusion in the form of a duplicated word. Please correct." && exit 1 || true - git grep -iE '(^| )(\w+) \2(\.|,|:|;| |$)' -- "*.asciidoc" "*.md" && echo "^ Detected lexical illusion in the form of a duplicated word. Please correct." && exit 1 || true
- for FILE in $(git ls-files -- "*.asciidoc" "*.md"); do if [[ $(tail -c1 $FILE) != "" ]]; then echo "File ${FILE} does not end with a newline character (\n)."; exit 1; fi; done - for FILE in $(git ls-files -- "*.asciidoc" "*.md"); do if [[ $(tail -c1 $FILE) != "" ]]; then echo "File ${FILE} does not end with a newline character (\n)."; exit 1; fi; done
- git grep "" -- "*.asciidoc" "*.md" | uniq -c | grep -1 "^ [2-9] " | cut -b9- | sed 's/:$/:[more-than-one-blank-line-here-please-remove]/' | grep ":" && echo "^ Multiple blank lines detected. Please use only one blank line between paragraphs." && exit 1 || true - git grep "" -- "*.asciidoc" "*.md" | uniq -c | grep -1 "^ [2-9] " | cut -b9- | sed 's/:$/:[more-than-one-blank-line-here-please-remove]/' | grep ":" && echo "^ Multiple blank lines detected. Please use only one blank line between paragraphs." && exit 1 || true
- git grep -E "^[= ]*[a-z]" -- "*.asciidoc" "*.md" | grep -vE '(:(link|pass):|::$)' | grep -vE ':[= ]*(http|https)' | grep -E "[a-z]" && echo "^ The first letter of the sentence should be capitalized. The end of the sentence should be on the same line as the beginning of the sentence. Please correct." && exit 1 || true
- codespell --ignore-words-list=que $(git ls-files -- "*.asciidoc" "*.md") - codespell --ignore-words-list=que $(git ls-files -- "*.asciidoc" "*.md")

View File

@ -76,7 +76,7 @@ Andresen noted that there might be a better construction which would require les
Andresen's work led to many discussions on Bitcointalk forum, and later on the bitcoin-development mailing list. These discussions resulted in the first construction of the first unidirectional payment channels. Andresen's work led to many discussions on Bitcointalk forum, and later on the bitcoin-development mailing list. These discussions resulted in the first construction of the first unidirectional payment channels.
to sum this up: Andresen used a similar construction as the unidirectional channel. To sum this up: Andresen used a similar construction as the unidirectional channel.
They key difference was that a trusted party would have co-signed the spend of the funding transaction. They key difference was that a trusted party would have co-signed the spend of the funding transaction.
The Ultra Server was not able to steal Bitcoin. The Ultra Server was not able to steal Bitcoin.

View File

@ -31,14 +31,14 @@
* gossip protocol * gossip protocol
* option to have private channels * option to have private channels
==== closing the channel ==== Closing the channel
* the good way - mutal close * the good way - mutal close
* the bad way - force close * the bad way - force close
* the ugly way - protocol breach * the ugly way - protocol breach
=== Invoices === Invoices
an alternative structure for the subsections of the invoice section (while covering the same topics) could be: (creating, decoding, paying as 3 sub chapters) An alternative structure for the subsections of the invoice section (while covering the same topics) could be: (creating, decoding, paying as 3 sub chapters)
* creating invoices * creating invoices
* decoding invoices * decoding invoices

View File

@ -28,7 +28,7 @@ Balance::
Nodes should aim to have balanced channels with similar inbound and outbound capicities. Nodes should aim to have balanced channels with similar inbound and outbound capicities.
bech32:: bech32::
tbd. TBD.
bip:: bip::
Bitcoin Improvement Proposals. A set of proposals that members of the bitcoin community have submitted to improve bitcoin. For example, BIP-21 is a proposal to improve the bitcoin uniform resource identifier (URI) scheme. Bitcoin Improvement Proposals. A set of proposals that members of the bitcoin community have submitted to improve bitcoin. For example, BIP-21 is a proposal to improve the bitcoin uniform resource identifier (URI) scheme.
@ -136,7 +136,7 @@ double-spending::
The Revocable Sequence Maturity Contracts used to construct payment channels heavily attempt to double-spend bitcoin. The Revocable Sequence Maturity Contracts used to construct payment channels heavily attempt to double-spend bitcoin.
downstream payment:: downstream payment::
tbd. TBD.
ECDSA:: ECDSA::
Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners. Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners.
@ -145,7 +145,7 @@ Eclair::
Implementation of the Lightning Network Protocol by the Paris based company ACINQ. It is written in Scala. Implementation of the Lightning Network Protocol by the Paris based company ACINQ. It is written in Scala.
encoding:: encoding::
tbd. TBD.
Ephemeral Key:: Ephemeral Key::
Ephemeral keys are mainly within the SPHINX Mix Format and Onion Routing on the Lightning Network. Ephemeral keys are mainly within the SPHINX Mix Format and Onion Routing on the Lightning Network.
@ -215,7 +215,7 @@ Lightning Network::
Other components of the lightning network are the gossip protocol, the transport layer and payment requests. Other components of the lightning network are the gossip protocol, the transport layer and payment requests.
Lightning Network Node:: Lightning Network Node::
tbd. TBD.
lnd:: lnd::
Implementation of the Lightning Network Protocol by the San Francisco based company Lightning Labs. Implementation of the Lightning Network Protocol by the San Francisco based company Lightning Labs.
@ -311,7 +311,7 @@ Proof-of-Work::
A piece of data that requires significant computation to find. In bitcoin, miners must find a numeric solution to the SHA256 algorithm that meets a network-wide target, the difficulty target. A piece of data that requires significant computation to find. In bitcoin, miners must find a numeric solution to the SHA256 algorithm that meets a network-wide target, the difficulty target.
Relative Timelock:: Relative Timelock::
tbd. TBD.
Revocable Sequence Maturity Contract:: Revocable Sequence Maturity Contract::
This contract is used to construct a payment channel between two Bitcoin or Lightning Network users who do not need to trust each other. This contract is used to construct a payment channel between two Bitcoin or Lightning Network users who do not need to trust each other.
@ -355,7 +355,7 @@ ScriptSig (aka signature script)::
ScriptSig or signature script, is the data generated by a spender which is almost always used as variables to satisfy a pubkey script. ScriptSig or signature script, is the data generated by a spender which is almost always used as variables to satisfy a pubkey script.
Second stage HTLC:: Second stage HTLC::
tbd. TBD.
secret key (aka private key):: secret key (aka private key)::
The secret number that unlocks bitcoin sent to the corresponding address. pass:[<span class="keep-together">A secret</span>] key looks like the following: The secret number that unlocks bitcoin sent to the corresponding address. pass:[<span class="keep-together">A secret</span>] key looks like the following:
@ -408,16 +408,16 @@ Transaction::
Transactions can also contain contracts and should not be confused with payments. Transactions can also contain contracts and should not be confused with payments.
Transaction Malleability:: Transaction Malleability::
tbd. TBD.
Transport Layer:: Transport Layer::
tbd. TBD.
unspent transaction output (UTXO):: unspent transaction output (UTXO)::
UTXO is an unspent transaction output that can be spent as an input to a new transaction. UTXO is an unspent transaction output that can be spent as an input to a new transaction.
upstream payment:: upstream payment::
tbd. TBD.
wallet:: wallet::
Software that holds all your bitcoin addresses and secret keys. Use it to send, receive, and store your bitcoin. Software that holds all your bitcoin addresses and secret keys. Use it to send, receive, and store your bitcoin.

View File

@ -1,5 +1,5 @@
[preface] [preface]
== list of topics == List of topics
This is a list of grouped topics that might be covered in the book. This is a list of grouped topics that might be covered in the book.
It will lead to the creation of an index It will lead to the creation of an index
@ -186,11 +186,11 @@ Creating Lightning Network Applications
* btc pay server * btc pay server
* Turbo Channels https://medium.com/@akumaigorodski/instant-channels-enable-safe-lightning-payments-with-unconfirmed-funding-8d640defa183 * Turbo Channels https://medium.com/@akumaigorodski/instant-channels-enable-safe-lightning-payments-with-unconfirmed-funding-8d640defa183
=== comparisons and examples === Comparisons and examples
The following is a loose list of potential infoboxes, tables and dropins which will most likely make it to some part of the book. The following is a loose list of potential infoboxes, tables and dropins which will most likely make it to some part of the book.
They have particular illustrative purpose and are therefore collected separately to keep better track of them. They have particular illustrative purpose and are therefore collected separately to keep better track of them.
==== comparisons ==== Comparisons
* payment process on Bitcoin vs payment process on the lightning network * payment process on Bitcoin vs payment process on the lightning network
* transaction vs payment * transaction vs payment
* capacity vs balance * capacity vs balance
@ -202,10 +202,10 @@ They have particular illustrative purpose and are therefore collected separately
* locked bitcoin vs freely movable bitcoin (onchain vs. offchain bitcoin) * locked bitcoin vs freely movable bitcoin (onchain vs. offchain bitcoin)
* routing vs path finding * routing vs path finding
==== examples ==== Examples
tba TBA.
==== properties ==== Properties
* the seven ingredients for a payment channel c.f: https://youtu.be/AcP3czefanM * the seven ingredients for a payment channel c.f: https://youtu.be/AcP3czefanM
** 2-2 musig address ** 2-2 musig address