-
Notifications
You must be signed in to change notification settings - Fork 36.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Fix various typos #10633
doc: Fix various typos #10633
Conversation
ACK 7540cdb94fdc54387cf1bd5b345af8e7c9ee881e |
Please unify all three typo PRs into this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7540cdb94fdc54387cf1bd5b345af8e7c9ee881e
I hope I did this correctly. I fixed the other typos in the same dimitris-t:patch-1 branch as this PR. Updated this PR's description. Closed the other two PRs. |
ACK 83d81483d6a15a7615aeace73003c283a24ee9e5 Thanks for your contribution and welcome as a contributor! |
Can you fix all a -> an? E.g.
|
Few more:
And squash afterwards, please. |
A comment inside of bitcoinstrings.cpp says it is auto-generated, should I touch it? |
When fixing a-vs-an typos, please consider fixing these as well: diff --git a/contrib/rpm/bitcoin.if b/contrib/rpm/bitcoin.if
index 2b096c2..b206866 100644
--- a/contrib/rpm/bitcoin.if
+++ b/contrib/rpm/bitcoin.if
@@ -121,7 +121,7 @@ interface(`bitcoin_manage_lib_dirs',`
########################################
## <summary>
## All of the rules required to administrate
-## an bitcoin environment
+## a bitcoin environment
## </summary>
## <param name="domain">
## <summary>
diff --git a/src/httpserver.h b/src/httpserver.h
index 6be9950..9df56e5 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -86,7 +86,7 @@ public:
/**
* Get the request header specified by hdr, or an empty string.
- * Return an pair (isPresent,string).
+ * Return a pair (isPresent,string).
*/
std::pair<bool, std::string> GetHeader(const std::string& hdr);
@@ -125,7 +125,7 @@ public:
virtual ~HTTPClosure() {}
};
-/** Event class. This can be used either as an cross-thread trigger or as a timer.
+/** Event class. This can be used either as a cross-thread trigger or as a timer.
*/
class HTTPEvent
{
diff --git a/src/rest.cpp b/src/rest.cpp
index 8fb0c13..33e3fb4 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -413,7 +413,7 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
boost::split(uriParts, strUriParams, boost::is_any_of("/"));
}
- // throw exception in case of a empty request
+ // throw exception in case of an empty request
std::string strRequestMutable = req->ReadBody();
if (strRequestMutable.length() == 0 && uriParts.size() == 0)
return RESTERR(req, HTTP_BAD_REQUEST, "Error: empty request");
diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json
index e35a7ce..0390d68 100644
--- a/src/test/data/script_tests.json
+++ b/src/test/data/script_tests.json
@@ -2506,7 +2506,7 @@
],
["CHECKSEQUENCEVERIFY tests"],
-["", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "INVALID_STACK_OPERATION", "CSV automatically fails on a empty stack"],
+["", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "INVALID_STACK_OPERATION", "CSV automatically fails on an empty stack"],
["-1", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "NEGATIVE_LOCKTIME", "CSV automatically fails if stack top is negative"],
["0x0100", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY,MINIMALDATA", "UNKNOWN_ERROR", "CSV fails if stack top is not minimally encoded"],
["0", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME", "CSV fails if stack top bit 1 << 31 is set and the tx version < 2"],
diff --git a/src/validation.cpp b/src/validation.cpp
index bef1733..7b40447 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1206,7 +1206,7 @@ static bool CheckInputs(const CTransaction& tx, CValidationState &state, const C
return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError())));
}
// Failures of other flags indicate a transaction that is
- // invalid in new blocks, e.g. a invalid P2SH. We DoS ban
+ // invalid in new blocks, e.g. an invalid P2SH. We DoS ban
// such nodes as they are not following the protocol. That
// said during an upgrade careful thought should be taken
// as to the correct behavior - we may want to continue
diff --git a/test/functional/rest.py b/test/functional/rest.py
index fbcceba..6e58090 100755
--- a/test/functional/rest.py
+++ b/test/functional/rest.py
@@ -82,9 +82,9 @@ class RESTTest (BitcoinTestFramework):
n = vout['n']
- ######################################
- # GETUTXOS: query a unspent outpoint #
- ######################################
+ #######################################
+ # GETUTXOS: query an unspent outpoint #
+ #######################################
json_request = '/checkmempool/'+txid+'-'+str(n)
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
@@ -97,9 +97,9 @@ class RESTTest (BitcoinTestFramework):
assert_equal(json_obj['utxos'][0]['value'], 0.1)
- ################################################
- # GETUTXOS: now query a already spent outpoint #
- ################################################
+ #################################################
+ # GETUTXOS: now query an already spent outpoint #
+ #################################################
json_request = '/checkmempool/'+vintx+'-0'
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
@@ -171,14 +171,14 @@ class RESTTest (BitcoinTestFramework):
#do some invalid requests
json_request = '{"checkmempool'
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
- assert_equal(response.status, 400) #must be a 400 because we send a invalid json request
+ assert_equal(response.status, 400) #must be a 400 because we send an invalid json request
json_request = '{"checkmempool'
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', json_request, True)
- assert_equal(response.status, 400) #must be a 400 because we send a invalid bin request
+ assert_equal(response.status, 400) #must be a 400 because we send an invalid bin request
response = http_post_call(url.hostname, url.port, '/rest/getutxos/checkmempool'+self.FORMAT_SEPARATOR+'bin', '', True)
- assert_equal(response.status, 400) #must be a 400 because we send a invalid bin request
+ assert_equal(response.status, 400) #must be a 400 because we send an invalid bin request
#test limits
json_request = '/checkmempool/' |
src/rpc/net.cpp
Outdated
@@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request) | |||
"setban \"subnet\" \"add|remove\" (bantime) (absolute)\n" | |||
"\nAttempts add or remove a IP/Subnet from the banned list.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/remove a IP/remove an IP/
src/rpc/net.cpp
Outdated
@@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request) | |||
"setban \"subnet\" \"add|remove\" (bantime) (absolute)\n" | |||
"\nAttempts add or remove a IP/Subnet from the banned list.\n" | |||
"\nArguments:\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n" | |||
"2. \"command\" (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/remove a IP/remove an IP/
src/rpc/net.cpp
Outdated
@@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request) | |||
"setban \"subnet\" \"add|remove\" (bantime) (absolute)\n" | |||
"\nAttempts add or remove a IP/Subnet from the banned list.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/Attempts add or remove/Attempts to add or remove/
src/rpc/net.cpp
Outdated
@@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request) | |||
"setban \"subnet\" \"add|remove\" (bantime) (absolute)\n" | |||
"\nAttempts add or remove a IP/Subnet from the banned list.\n" | |||
"\nArguments:\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/ip/IP/g
src/rpc/net.cpp
Outdated
@@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request) | |||
"setban \"subnet\" \"add|remove\" (bantime) (absolute)\n" | |||
"\nAttempts add or remove a IP/Subnet from the banned list.\n" | |||
"\nArguments:\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n" | |||
"1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n" | |||
"2. \"command\" (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list\n" | |||
"3. \"bantime\" (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/ip/IP/g
If we are also considering "a->an" in comments, there is a ton of them that show up with:
I will do all of those then. I am performing those changes on the GitHub GUI. Can I squash my commits on the GUI or is this something you will do when you merge the PR? |
The preferred way to squash your commits is mentioned in https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
@dimitris-t Converted into
|
ok, I figured out how to squash the commits using the command line, I will get on with the typo fixes and squash once more at the end. |
I believe I have done all the requested changes, except for src/qt/bitcoinstrings.cpp that has a comment saying it is auto-generated. Squashed everything into 1 commit. |
utACK 4b4f6469adf24234e686b8c9d8ba3bc739266ce3 Good work! |
utACK 4b4f6469adf24234e686b8c9d8ba3bc739266ce3 |
utACK 4b4f646 |
With
I can see about 12 such occurrences. Shall I tackle this here or leave it for a new PR? |
@dimitris-t Please include them here. Very good cleanup work! Keep it coming |
Removed duplicate words, ready for review. |
utACK b2665227548b1a614f8bf699c3c0b7ece3d38796 |
utACK on the changes; nit: Can you please add a newline in your commit message between the subject line and the description?
|
A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
There should be a newline after "Fixed multiple typos" now. |
utACK 0a5a6b9 |
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
@dimitris-t Seems your regex to find duplicate words didn't take line breaks into account, e.g. https://github.com/bitcoin/bitcoin/search?utf8=%E2%9C%93&q=%22the+the%22&type= Just in case you feel like doing a followup :-) |
Thanks, I will definitely do a follow-up, now that I got the hang of it. |
Could you submit the changes to subtrees upstream, please. I.e. https://github.com/bitcoin-core/secp256k1 for the secp256k1 changes. |
Sure, the other upstream one I see is https://github.com/bitcoin-core/leveldb. If there is anything else please let me know. |
The others are listed in this section: https://github.com/bitcoin/bitcoin/tree/master/contrib/devtools#git-subtree-checksh |
Here they are: |
@dimitris-t Some additional typos that you could tackle in a follow up PR:
|
8c7ea22 Fixed multiple typos (Dimitris Tsapakidis) Pull request description: Forward port of fixes introduced in bitcoin/bitcoin#10633 by @dimitris-t. Tree-SHA512: a979b3e14bf2660cb0fcd809854654bd0f6277399afe948917be6c061a04835d404e590dc58bcb4a9e2ccfbfb38de944cbdba349092465f637606d3bee49fc16
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
* Tests for signature length to script_tests Partial pick of: Add SCRIPT_ENABLE_SCHNORR support to sigencoding https://reviews.bitcoinabc.org/D2469 * Add some script tests related to BOOL ops and odd values like negative 0. bitcoin/bitcoin#12425 * Partial cherry-pick of "Fixed multiple typos" bitcoin/bitcoin#10633
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
Update LevelDB to upstream commit f545dfabf Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7911 - bitcoin/bitcoin#7982 - bitcoin/bitcoin#8133 - bitcoin/bitcoin#8784 - Only the missing changes. - bitcoin/bitcoin#8826 - bitcoin/bitcoin#8613 - bitcoin/bitcoin#10544 - bitcoin/bitcoin#10633 - Only the changes to files and code we have. - bitcoin/bitcoin#10806 - bitcoin/bitcoin#10958 - bitcoin/bitcoin#12451 - bitcoin/bitcoin#13925 - bitcoin/bitcoin#15270 This upgrades LevelDB in the exact same commit progression as upstream, up to January 2019.
"on a already existing" -> "on an already existing". Change made on two occurrences.