doc: Fix various typos #10633

pull dimitris-t wants to merge 1 commits into bitcoin:master from dimitris-t:patch-1 changing 33 files +60 −60
  1. dimitris-t commented at 10:57 PM on June 19, 2017: contributor

    "on a already existing" -> "on an already existing". Change made on two occurrences.

  2. fanquake added the label Docs and Output on Jun 20, 2017
  3. practicalswift commented at 4:23 AM on June 20, 2017: contributor

    ACK 7540cdb94fdc54387cf1bd5b345af8e7c9ee881e

  4. paveljanik commented at 5:39 AM on June 20, 2017: contributor

    Please unify all three typo PRs into this one.

  5. jonasschnelli approved
  6. jonasschnelli commented at 6:02 AM on June 20, 2017: contributor

    ACK 7540cdb94fdc54387cf1bd5b345af8e7c9ee881e

  7. jonasschnelli commented at 6:05 AM on June 20, 2017: contributor

    Can you combine the typo PRs? Add 8964c1c83360c188561607e2a03af44e354f8d60 and aeabc7a8e1fc0f6ed1c0be9f7266a5b63717de31 here and change the PR description? Ideally, typo-/trivial-PRs should be kept at a minimum because they take away precious review time. However, thank you for fixing the typos.

  8. dimitris-t renamed this:
    Fixes typos in wallet.cpp
    Fixes typos in wallet.cpp, optionsdialog.ui and rpcconsole.cpp
    on Jun 20, 2017
  9. dimitris-t commented at 8:05 AM on June 20, 2017: contributor

    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.

  10. practicalswift commented at 8:18 AM on June 20, 2017: contributor

    ACK 83d81483d6a15a7615aeace73003c283a24ee9e5

    Thanks for your contribution and welcome as a contributor!

  11. paveljanik commented at 9:09 AM on June 20, 2017: contributor

    Can you fix all a -> an? E.g.

    src/rpc/net.cpp:                            "4. \"absolute\"     (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
    
  12. paveljanik commented at 9:27 AM on June 20, 2017: contributor

    Few more:

    src/qt/bitcoinstrings.cpp:"Error loading %s: You can't enable HD on a already existing non-HD wallet"),
    src/qt/bitcoinstrings.cpp:QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: You can't disable HD on a already existing HD wallet"),
    src/qt/clientmodel.cpp:        //pass a async signal to the UI thread
    test/functional/rest.py:        # GETUTXOS: now query a already spent outpoint #
    

    And squash afterwards, please.

  13. dimitris-t commented at 9:33 AM on June 20, 2017: contributor

    A comment inside of bitcoinstrings.cpp says it is auto-generated, should I touch it?

  14. practicalswift commented at 9:41 AM on June 20, 2017: contributor

    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/'
    
  15. in src/rpc/net.cpp:500 in 8e6d815215 outdated
     498 | @@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request)
     499 |                              "setban \"subnet\" \"add|remove\" (bantime) (absolute)\n"
     500 |                              "\nAttempts add or remove a IP/Subnet from the banned list.\n"
    


    practicalswift commented at 9:42 AM on June 20, 2017:

    Nit: s/remove a IP/remove an IP/


    practicalswift commented at 9:43 AM on June 20, 2017:

    Nit: s/Attempts add or remove/Attempts to add or remove/

  16. in src/rpc/net.cpp:503 in 8e6d815215 outdated
     498 | @@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request)
     499 |                              "setban \"subnet\" \"add|remove\" (bantime) (absolute)\n"
     500 |                              "\nAttempts add or remove a IP/Subnet from the banned list.\n"
     501 |                              "\nArguments:\n"
     502 | -                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
     503 | +                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n"
     504 |                              "2. \"command\"      (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list\n"
    


    practicalswift commented at 9:43 AM on June 20, 2017:

    Nit: s/remove a IP/remove an IP/

  17. in src/rpc/net.cpp:502 in 8e6d815215 outdated
     498 | @@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request)
     499 |                              "setban \"subnet\" \"add|remove\" (bantime) (absolute)\n"
     500 |                              "\nAttempts add or remove a IP/Subnet from the banned list.\n"
     501 |                              "\nArguments:\n"
     502 | -                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
     503 | +                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n"
    


    practicalswift commented at 9:44 AM on June 20, 2017:

    Nit: s/ip/IP/g

  18. in src/rpc/net.cpp:504 in 8e6d815215 outdated
     498 | @@ -499,10 +499,10 @@ UniValue setban(const JSONRPCRequest& request)
     499 |                              "setban \"subnet\" \"add|remove\" (bantime) (absolute)\n"
     500 |                              "\nAttempts add or remove a IP/Subnet from the banned list.\n"
     501 |                              "\nArguments:\n"
     502 | -                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
     503 | +                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with an optional netmask (default is /32 = single ip)\n"
     504 |                              "2. \"command\"      (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list\n"
     505 |                              "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"
    


    practicalswift commented at 9:44 AM on June 20, 2017:

    Nit: s/ip/IP/g

  19. dimitris-t commented at 9:54 AM on June 20, 2017: contributor

    If we are also considering "a->an" in comments, there is a ton of them that show up with:

    grep -i -E -R --exclude-dir locale "\ba [eioa]" *

    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?

  20. MarcoFalke commented at 10:45 AM on June 20, 2017: member

    The preferred way to squash your commits is mentioned in https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits Please note that the GitHub GUI does not support squashing, you'd need to do it locally on your machine.

  21. practicalswift commented at 10:56 AM on June 20, 2017: contributor

    @dimitris-t Converted into git grep and excluding false positives with grep:

    $ git grep -E "\ba [eioa]" | egrep -v '(/(locale|release-notes|secp256k1|univalue)/|\.a|\.xpm|%a|for a in)'
    src/chain.cpp:    // as it's too large for a arith_uint256. However, as 2**256 is at least as large
    src/cuckoocache.h:    /** epoch_heuristic_counter is used to determine when a epoch might be aged
    src/cuckoocache.h:     * epoch. When the number of non-erased elements in a epoch
    src/qt/bitcoinstrings.cpp:"Error loading %s: You can't enable HD on a already existing non-HD wallet"),
    src/qt/bitcoinstrings.cpp:QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: You can't disable HD on a already existing HD wallet"),
    src/qt/clientmodel.cpp:        //pass a async signal to the UI thread
    src/qt/rpcconsole.cpp:    //don't allow a insane font size
    src/rpc/net.cpp:                            "1. \"subnet\"       (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
    src/rpc/net.cpp:                            "4. \"absolute\"     (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
    src/test/arith_uint256_tests.cpp:// element of Aarray and Barray, and then converting the result into a arith_uint256.
    src/torcontrol.cpp: * and maintain a ephemeral hidden service.
    src/utilstrencodings.cpp:    // Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow
    src/utilstrencodings.cpp:    // Note that strtoll returns a *long long int*, so even if strtol doesn't report a over/underflow
    src/utilstrencodings.cpp:    // Note that strtoul returns a *unsigned long int*, so even if it doesn't report a over/underflow
    src/utilstrencodings.cpp:    // Note that strtoull returns a *unsigned long long int*, so even if it doesn't report a over/underflow
    src/wallet/wallet.cpp:            InitError(strprintf(_("Error loading %s: You can't disable HD on a already existing HD wallet"), walletFile));
    src/wallet/wallet.cpp:            InitError(strprintf(_("Error loading %s: You can't enable HD on a already existing non-HD wallet"), walletFile));
    src/wallet/wallet.cpp:        //this might happen if a user uses a old wallet within a pruned node
    test/functional/rest.py:        assert_equal(len(json_obj['utxos']), 0) #there should be a outpoint because it has just added to the mempool
    test/functional/rest.py:        assert_equal(len(json_obj['utxos']), 1) #there should be a outpoint because it has just added to the mempool
    test/functional/zapwallettxes.py:        #there must be a expection because the unconfirmed wallettx0 must be gone by now
    
  22. MarcoFalke renamed this:
    Fixes typos in wallet.cpp, optionsdialog.ui and rpcconsole.cpp
    doc: Fix various typos
    on Jun 20, 2017
  23. dimitris-t commented at 4:22 PM on June 20, 2017: contributor

    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.

  24. dimitris-t commented at 5:11 PM on June 20, 2017: contributor

    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.

  25. practicalswift commented at 6:37 PM on June 20, 2017: contributor

    utACK 4b4f6469adf24234e686b8c9d8ba3bc739266ce3

    Good work!

  26. sipa commented at 8:25 PM on June 20, 2017: member

    utACK 4b4f6469adf24234e686b8c9d8ba3bc739266ce3

  27. paveljanik commented at 8:32 PM on June 20, 2017: contributor

    utACK 4b4f646

  28. dimitris-t commented at 10:03 PM on June 20, 2017: contributor

    With grep --colour -i -E -R --exclude-dir pixmaps "\b([a-zA-Z]+)\s+\1\b" * you can spot a number of words repeated by mistake, such as:

    Stating whether matching outputs should be be treated as not incoming payments

    I can see about 12 such occurrences. Shall I tackle this here or leave it for a new PR?

  29. practicalswift commented at 5:28 AM on June 21, 2017: contributor

    @dimitris-t Please include them here. Very good cleanup work! Keep it coming

  30. dimitris-t commented at 9:35 PM on June 21, 2017: contributor

    Removed duplicate words, ready for review.

  31. practicalswift commented at 9:35 PM on June 21, 2017: contributor

    utACK b2665227548b1a614f8bf699c3c0b7ece3d38796

  32. laanwj commented at 3:31 PM on June 22, 2017: member

    utACK on the changes;

    nit: Can you please add a newline in your commit message between the subject line and the description? Otherwise, tooling (such as git shortlog) will put all the entire message on one line:

    * b266522 Fixed multiple typos 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". (Dimitris Tsapakidis) (pull/10633/head)
    
  33. Fixed multiple typos
    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".
    0a5a6b90bc
  34. dimitris-t commented at 4:27 PM on June 22, 2017: contributor

    There should be a newline after "Fixed multiple typos" now.

  35. practicalswift commented at 5:55 PM on June 22, 2017: contributor

    utACK 0a5a6b90bc75a8d75fdff71c9b08abe9b0b96b0a

  36. laanwj merged this on Jun 22, 2017
  37. laanwj closed this on Jun 22, 2017

  38. laanwj referenced this in commit 6bef7ca8bc on Jun 22, 2017
  39. flack commented at 8:18 PM on June 22, 2017: contributor

    @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 :-)

  40. dimitris-t commented at 8:22 PM on June 22, 2017: contributor

    Thanks, I will definitely do a follow-up, now that I got the hang of it.

  41. dimitris-t deleted the branch on Jun 22, 2017
  42. MarcoFalke commented at 8:50 PM on June 22, 2017: member

    Could you submit the changes to subtrees upstream, please.

    I.e. https://github.com/bitcoin-core/secp256k1 for the secp256k1 changes.

  43. dimitris-t commented at 9:01 PM on June 22, 2017: contributor

    Sure, the other upstream one I see is https://github.com/bitcoin-core/leveldb. If there is anything else please let me know.

  44. MarcoFalke commented at 9:04 PM on June 22, 2017: member
  45. practicalswift commented at 8:35 AM on June 26, 2017: contributor

    @dimitris-t Some additional typos that you could tackle in a follow up PR:

    # a vs an ("an already", "an one-off")
    src/qt/bitcoinstrings.cpp:"Error loading %s: You can't enable HD on a already existing non-HD wallet"),
    src/qt/bitcoinstrings.cpp:QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: You can't disable HD on a already existing HD wallet"),
    src/test/netbase_tests.cpp:    // and that a one-off resolves correctly
    
    # duplicate words ("command")
    doc/Doxyfile.in:# popen()) the command command input-file, where command is the value of the
    
    # typo ("transfer")
    src/httpserver.cpp:    // tranfer ownership to eventBase/HTTP via .release()
    
  46. sipa referenced this in commit ab1f89f00a on Sep 25, 2017
  47. PastaPastaPasta referenced this in commit 549d3dc837 on Jul 6, 2019
  48. PastaPastaPasta referenced this in commit a0cb955343 on Jul 8, 2019
  49. PastaPastaPasta referenced this in commit 86b72b2cc7 on Jul 9, 2019
  50. PastaPastaPasta referenced this in commit 5f2c9d7307 on Jul 11, 2019
  51. dagurval referenced this in commit 582f36b824 on Aug 28, 2019
  52. gandrewstone referenced this in commit 0504448dbd on Aug 30, 2019
  53. barrystyle referenced this in commit ec135ec330 on Jan 22, 2020
  54. zkbot referenced this in commit 59d6a92e7d on Sep 22, 2020
  55. zkbot referenced this in commit 514d868179 on Sep 25, 2020
  56. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me