Browse Source

Merge pull request #6085

b05a89b Non-grammatical language improvements (Luke Dashjr)
7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
00e76db8c2
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 4
      doc/README_osx.txt
  2. 2
      doc/bips.md
  3. 2
      doc/build-osx.md
  4. 6
      doc/build-unix.md
  5. 6
      doc/developer-notes.md
  6. 13
      doc/dnsseed-policy.md
  7. 10
      doc/gitian-building.md
  8. 2
      doc/init.md
  9. 2
      doc/release-process.md
  10. 4
      doc/translation_process.md
  11. 2
      qa/rpc-tests/README.md
  12. 2
      qa/rpc-tests/util.py
  13. 2
      qa/rpc-tests/wallet.py
  14. 8
      src/addrman.h
  15. 6
      src/base58.h
  16. 8
      src/bloom.h
  17. 2
      src/chain.h
  18. 9
      src/chainparams.cpp
  19. 6
      src/chainparams.h
  20. 4
      src/chainparamsbase.h
  21. 7
      src/checkpoints.cpp
  22. 2
      src/checkpoints.h
  23. 6
      src/checkqueue.h
  24. 4
      src/init.cpp
  25. 45
      src/main.cpp
  26. 2
      src/main.h
  27. 4
      src/merkleblock.cpp
  28. 2
      src/merkleblock.h
  29. 4
      src/net.h
  30. 2
      src/qt/askpassphrasedialog.cpp
  31. 20
      src/qt/coincontroldialog.cpp
  32. 2
      src/qt/optionsdialog.cpp
  33. 4
      src/qt/sendcoinsdialog.cpp
  34. 2
      src/qt/sendcoinsentry.cpp
  35. 4
      src/rpcserver.cpp
  36. 10
      src/wallet/wallet.cpp

4
doc/README_osx.txt

@ -1,6 +1,6 @@
Deterministic OSX Dmg Notes. Deterministic OSX Dmg Notes.
Working OSX DMG's are created in Linux by combining a recent clang, Working OSX DMGs are created in Linux by combining a recent clang,
the Apple's binutils (ld, ar, etc), and DMG authoring tools. the Apple's binutils (ld, ar, etc), and DMG authoring tools.
Apple uses clang extensively for development and has upstreamed the necessary Apple uses clang extensively for development and has upstreamed the necessary
@ -58,7 +58,7 @@ libdmg-hfsplus project is used to compress it. There are several bugs in this
tool and its maintainer has seemingly abandoned the project. It has been forked tool and its maintainer has seemingly abandoned the project. It has been forked
and is available (with fixes) here: https://github.com/theuni/libdmg-hfsplus . and is available (with fixes) here: https://github.com/theuni/libdmg-hfsplus .
The 'dmg' tool has the ability to create DMG's from scratch as well, but this The 'dmg' tool has the ability to create DMGs from scratch as well, but this
functionality is broken. Only the compression feature is currently used. functionality is broken. Only the compression feature is currently used.
Ideally, the creation could be fixed and genisoimage would no longer be necessary. Ideally, the creation could be fixed and genisoimage would no longer be necessary.

2
doc/bips.md

@ -11,7 +11,7 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.10.0**):
* [`BIP 31`](https://github.com/bitcoin/bips/blob/master/bip-0031.mediawiki): The 'pong' protocol message (and the protocol version bump to 60001) has been implemented since **v0.6.1** ([PR #1081](https://github.com/bitcoin/bitcoin/pull/1081)). * [`BIP 31`](https://github.com/bitcoin/bips/blob/master/bip-0031.mediawiki): The 'pong' protocol message (and the protocol version bump to 60001) has been implemented since **v0.6.1** ([PR #1081](https://github.com/bitcoin/bitcoin/pull/1081)).
* [`BIP 34`](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki): The rule that requires blocks to contain their height (number) in the coinbase input, and the introduction of version 2 blocks has been implemented since **v0.7.0**. The rule took effect for version 2 blocks as of *block 224413* (March 5th 2013), and version 1 blocks are no longer allowed since *block 227931* (March 25th 2013) ([PR #1526](https://github.com/bitcoin/bitcoin/pull/1526)). * [`BIP 34`](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki): The rule that requires blocks to contain their height (number) in the coinbase input, and the introduction of version 2 blocks has been implemented since **v0.7.0**. The rule took effect for version 2 blocks as of *block 224413* (March 5th 2013), and version 1 blocks are no longer allowed since *block 227931* (March 25th 2013) ([PR #1526](https://github.com/bitcoin/bitcoin/pull/1526)).
* [`BIP 35`](https://github.com/bitcoin/bips/blob/master/bip-0035.mediawiki): The 'mempool' protocol message (and the protocol version bump to 60002) has been implemented since **v0.7.0** ([PR #1641](https://github.com/bitcoin/bitcoin/pull/1641)). * [`BIP 35`](https://github.com/bitcoin/bips/blob/master/bip-0035.mediawiki): The 'mempool' protocol message (and the protocol version bump to 60002) has been implemented since **v0.7.0** ([PR #1641](https://github.com/bitcoin/bitcoin/pull/1641)).
* [`BIP 37`](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial merkle trees for blocks , and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/bitcoin/bitcoin/pull/1795)). * [`BIP 37`](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial merkle trees for blocks, and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/bitcoin/bitcoin/pull/1795)).
* [`BIP 42`](https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki): The bug that would have caused the subsidy schedule to resume after block 13440000 was fixed in **v0.9.2** ([PR #3842](https://github.com/bitcoin/bitcoin/pull/3842)). * [`BIP 42`](https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki): The bug that would have caused the subsidy schedule to resume after block 13440000 was fixed in **v0.9.2** ([PR #3842](https://github.com/bitcoin/bitcoin/pull/3842)).
* [`BIP 61`](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/bitcoin/bitcoin/pull/3185)). * [`BIP 61`](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/bitcoin/bitcoin/pull/3185)).
* [`BIP 66`](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki): The strict DER rules and associated version 3 blocks have been implemented since **v0.10.0** ([PR #5713](https://github.com/bitcoin/bitcoin/pull/5713)). * [`BIP 66`](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki): The strict DER rules and associated version 3 blocks have been implemented since **v0.10.0** ([PR #5713](https://github.com/bitcoin/bitcoin/pull/5713)).

2
doc/build-osx.md

@ -1,6 +1,6 @@
Mac OS X Build Instructions and Notes Mac OS X Build Instructions and Notes
==================================== ====================================
This guide will show you how to build bitcoind(headless client) for OSX. This guide will show you how to build bitcoind (headless client) for OSX.
Notes Notes
----- -----

6
doc/build-unix.md

@ -195,12 +195,12 @@ Hardening enables the following features:
* Position Independent Executable * Position Independent Executable
Build position independent code to take advantage of Address Space Layout Randomization Build position independent code to take advantage of Address Space Layout Randomization
offered by some kernels. An attacker who is able to cause execution of code at an arbitrary offered by some kernels. Attackers who can cause execution of code at an arbitrary memory
memory location is thwarted if he or she doesn't know where anything useful is located. location are thwarted if they don't know where anything useful is located.
The stack and heap are randomly located by default but this allows the code section to be The stack and heap are randomly located by default but this allows the code section to be
randomly located as well. randomly located as well.
On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error On an AMD64 processor where a library was not compiled with -fPIC, this will cause an error
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"
To test that you have built PIE executable, install scanelf, part of paxutils, and use: To test that you have built PIE executable, install scanelf, part of paxutils, and use:

6
doc/developer-notes.md

@ -53,7 +53,7 @@ bool function(int arg1, const char *arg2)
``` ```
A complete list of `@xxx` commands can be found at http://www.stack.nl/~dimitri/doxygen/manual/commands.html. A complete list of `@xxx` commands can be found at http://www.stack.nl/~dimitri/doxygen/manual/commands.html.
As Doxygen recognizes the comments by the delimiters (`/**` and `*/` in this case), you don't As Doxygen recognizes the comments by the delimiters (`/**` and `*/` in this case), you don't
*need* to provide any commands for a comment to be valid, just a description text is fine. *need* to provide any commands for a comment to be valid; just a description text is fine.
To describe a class use the same construct above the class definition: To describe a class use the same construct above the class definition:
```c++ ```c++
@ -175,7 +175,7 @@ Threads
Pull Request Terminology Pull Request Terminology
------------------------ ------------------------
Concept ACK - Agree with the idea and overall direction, but haven't reviewed the code changes or tested them. Concept ACK - Agree with the idea and overall direction, but have neither reviewed nor tested the code changes.
utACK (untested ACK) - Reviewed and agree with the code changes but haven't actually tested them. utACK (untested ACK) - Reviewed and agree with the code changes but haven't actually tested them.
@ -183,4 +183,4 @@ Tested ACK - Reviewed the code changes and have verified the functionality or bu
ACK - A loose ACK can be confusing. It's best to avoid them unless it's a documentation/comment only change in which case there is nothing to test/verify; therefore the tested/untested distinction is not there. ACK - A loose ACK can be confusing. It's best to avoid them unless it's a documentation/comment only change in which case there is nothing to test/verify; therefore the tested/untested distinction is not there.
NACK - Disagree with the code changes/concept. Should be accompanied by an explanation. NACK - Disagree with the code changes/concept. Should be accompanied by an explanation.

13
doc/dnsseed-policy.md

@ -10,15 +10,14 @@ Other implementations of Bitcoin software may also use the same
seeds and may be more exposed. In light of this exposure, this seeds and may be more exposed. In light of this exposure, this
document establishes some basic expectations for operating dnsseeds. document establishes some basic expectations for operating dnsseeds.
0. A DNS seed operating organization or person is expected 0. A DNS seed operating organization or person is expected to follow good
to follow good host security practices and maintain control of host security practices, maintain control of applicable infrastructure,
their serving infrastructure and not sell or transfer control of their and not sell or transfer control of the DNS seed. Any hosting services
DNS seed. Any hosting services contracted by the operator are contracted by the operator are equally expected to uphold these expectations.
equally expected to uphold these expectations.
1. The DNS seed results must consist exclusively of fairly selected and 1. The DNS seed results must consist exclusively of fairly selected and
functioning Bitcoin nodes from the public network to the best of the functioning Bitcoin nodes from the public network to the best of the
operators understanding and capability. operator's understanding and capability.
2. For the avoidance of doubt, the results may be randomized but must not 2. For the avoidance of doubt, the results may be randomized but must not
single-out any group of hosts to receive different results unless due to an single-out any group of hosts to receive different results unless due to an
@ -28,7 +27,7 @@ urgent technical necessity and disclosed.
4. Any logging of DNS queries should be only that which is necessary 4. Any logging of DNS queries should be only that which is necessary
for the operation of the service or urgent health of the Bitcoin for the operation of the service or urgent health of the Bitcoin
network and must not be retained longer than necessary or disclosed network and must not be retained longer than necessary nor disclosed
to any third party. to any third party.
5. Information gathered as a result of the operators node-spidering 5. Information gathered as a result of the operators node-spidering

10
doc/gitian-building.md

@ -87,7 +87,7 @@ After creating the VM, we need to configure it.
![](gitian-building/network_settings.png) ![](gitian-building/network_settings.png)
- Click `Advanced`, then `Port Forwarding`. We want to set up a port through where we can reach the VM to get files in and out. - Click `Advanced`, then `Port Forwarding`. We want to set up a port through which we can reach the VM to get files in and out.
- Create a new rule by clicking the plus icon. - Create a new rule by clicking the plus icon.
![](gitian-building/port_forwarding_rules.png) ![](gitian-building/port_forwarding_rules.png)
@ -111,7 +111,7 @@ Installing Debian
This section will explain how to install Debian on the newly created VM. This section will explain how to install Debian on the newly created VM.
- Choose the non-graphical installer. We do not need the graphical environment, it will only increase installation time and disk usage. - Choose the non-graphical installer. We do not need the graphical environment; it will only increase installation time and disk usage.
![](gitian-building/debian_install_1_boot_menu.png) ![](gitian-building/debian_install_1_boot_menu.png)
@ -144,7 +144,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
![](gitian-building/debian_install_9_user_password.png) ![](gitian-building/debian_install_9_user_password.png)
- The installer will set up the clock using a time server, this process should be automatic - The installer will set up the clock using a time server; this process should be automatic
- Set up the clock: choose a time zone (depends on the locale settings that you picked earlier; specifics don't matter) - Set up the clock: choose a time zone (depends on the locale settings that you picked earlier; specifics don't matter)
![](gitian-building/debian_install_10_configure_clock.png) ![](gitian-building/debian_install_10_configure_clock.png)
@ -371,7 +371,7 @@ COMMIT=2014_03_windows_unicode_path
Signing externally Signing externally
------------------- -------------------
If you want to do the PGP signing on another device that's also possible; just define `SIGNER` as mentioned If you want to do the PGP signing on another device, that's also possible; just define `SIGNER` as mentioned
and follow the steps in the build process as normal. and follow the steps in the build process as normal.
gpg: skipped "laanwj": secret key not available gpg: skipped "laanwj": secret key not available
@ -393,4 +393,4 @@ Uploading signatures
After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if that's not possible create a pull [bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if that's not possible create a pull
request. You can also mail the files to me (laanwj@gmail.com) and I'll commit them. request. You can also mail the files to Wladimir (laanwj@gmail.com) and he will commit them.

2
doc/init.md

@ -63,7 +63,7 @@ can then be controlled by group membership.
4a) systemd 4a) systemd
Installing this .service file consists on just copying it to Installing this .service file consists of just copying it to
/usr/lib/systemd/system directory, followed by the command /usr/lib/systemd/system directory, followed by the command
"systemctl daemon-reload" in order to update running systemd configuration. "systemctl daemon-reload" in order to update running systemd configuration.

2
doc/release-process.md

@ -164,4 +164,4 @@ Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spur
- Add release notes for the new version to the directory `doc/release-notes` in git master - Add release notes for the new version to the directory `doc/release-notes` in git master
- Celebrate - Celebrate

4
doc/translation_process.md

@ -32,7 +32,7 @@ QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
### Creating a pull-request ### Creating a pull-request
For general PRs, you shouldn’t include any updates to the translation source files. They will be updated periodically, primarily around pre-releases, allowing time for any new phrases to be translated before public releases. This is also important in avoiding translation related merge conflicts. For general PRs, you shouldn’t include any updates to the translation source files. They will be updated periodically, primarily around pre-releases, allowing time for any new phrases to be translated before public releases. This is also important in avoiding translation related merge conflicts.
When an updated source file is merged into the Github repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators. When an updated source file is merged into the Github repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators.
To create the pull-request, use the following commands: To create the pull-request, use the following commands:
``` ```
@ -108,4 +108,4 @@ To create a new language template, you will need to edit the languages manifest
### Questions and general assistance ### Questions and general assistance
The Bitcoin-Core translation maintainers include *tcatm, seone, Diapolo, wumpus and luke-jr*.You can find them, and others, in the Freenode IRC chatroom - `irc.freenode.net #bitcoin-dev`. The Bitcoin-Core translation maintainers include *tcatm, seone, Diapolo, wumpus and luke-jr*.You can find them, and others, in the Freenode IRC chatroom - `irc.freenode.net #bitcoin-dev`.
If you are a translator, you should also subscribe to the mailing list, https://groups.google.com/forum/#!forum/bitcoin-translators. Announcements will be posted during application pre-releases to notify translators to check for updates. If you are a translator, you should also subscribe to the mailing list, https://groups.google.com/forum/#!forum/bitcoin-translators. Announcements will be posted during application pre-releases to notify translators to check for updates.

2
qa/rpc-tests/README.md

@ -28,7 +28,7 @@ Notes
A 200-block -regtest blockchain and wallets for four nodes A 200-block -regtest blockchain and wallets for four nodes
is created the first time a regression test is run and is created the first time a regression test is run and
is stored in the cache/ directory. Each node has 25 mature is stored in the cache/ directory. Each node has 25 mature
blocks (25*50=1250 BTC) in their wallet. blocks (25*50=1250 BTC) in its wallet.
After the first run, the cache/ blockchain and wallets are After the first run, the cache/ blockchain and wallets are
copied into a temporary directory and used as the initial copied into a temporary directory and used as the initial

2
qa/rpc-tests/util.py

@ -283,7 +283,7 @@ def send_zeropri_transaction(from_node, to_node, amount, fee):
Create&broadcast a zero-priority transaction. Create&broadcast a zero-priority transaction.
Returns (txid, hex-encoded-txdata) Returns (txid, hex-encoded-txdata)
Ensures transaction is zero-priority by first creating a send-to-self, Ensures transaction is zero-priority by first creating a send-to-self,
then using it's output then using its output
""" """
# Create a send-to-self with confirmed inputs: # Create a send-to-self with confirmed inputs:

2
qa/rpc-tests/wallet.py

@ -62,7 +62,7 @@ class WalletTest (BitcoinTestFramework):
walletinfo = self.nodes[0].getwalletinfo() walletinfo = self.nodes[0].getwalletinfo()
assert_equal(walletinfo['immature_balance'], 0) assert_equal(walletinfo['immature_balance'], 0)
# Have node0 mine a block, thus they will collect their own fee. # Have node0 mine a block, thus it will collect its own fee.
self.nodes[0].generate(1) self.nodes[0].generate(1)
self.sync_all() self.sync_all()

8
src/addrman.h

@ -17,8 +17,8 @@
#include <stdint.h> #include <stdint.h>
#include <vector> #include <vector>
/** /**
* Extended statistics about a CAddress * Extended statistics about a CAddress
*/ */
class CAddrInfo : public CAddress class CAddrInfo : public CAddress
{ {
@ -105,14 +105,14 @@ public:
/** Stochastic address manager /** Stochastic address manager
* *
* Design goals: * Design goals:
* * Keep the address tables in-memory, and asynchronously dump the entire to able in peers.dat. * * Keep the address tables in-memory, and asynchronously dump the entire table to peers.dat.
* * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. * * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.
* *
* To that end: * To that end:
* * Addresses are organized into buckets. * * Addresses are organized into buckets.
* * Address that have not yet been tried go into 1024 "new" buckets. * * Address that have not yet been tried go into 1024 "new" buckets.
* * Based on the address range (/16 for IPv4) of source of the information, 64 buckets are selected at random * * Based on the address range (/16 for IPv4) of source of the information, 64 buckets are selected at random
* * The actual bucket is chosen from one of these, based on the range the address itself is located. * * The actual bucket is chosen from one of these, based on the range in which the address itself is located.
* * One single address can occur in up to 8 different buckets, to increase selection chances for addresses that * * One single address can occur in up to 8 different buckets, to increase selection chances for addresses that
* are seen frequently. The chance for increasing this multiplicity decreases exponentially. * are seen frequently. The chance for increasing this multiplicity decreases exponentially.
* * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen * * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen

6
src/base58.h

@ -6,10 +6,10 @@
/** /**
* Why base-58 instead of standard base-64 encoding? * Why base-58 instead of standard base-64 encoding?
* - Don't want 0OIl characters that look the same in some fonts and * - Don't want 0OIl characters that look the same in some fonts and
* could be used to create visually identical looking account numbers. * could be used to create visually identical looking data.
* - A string with non-alphanumeric characters is not as easily accepted as an account number. * - A string with non-alphanumeric characters is not as easily accepted as input.
* - E-mail usually won't line-break if there's no punctuation to break at. * - E-mail usually won't line-break if there's no punctuation to break at.
* - Double-clicking selects the whole number as one word if it's all alphanumeric. * - Double-clicking selects the whole string as one word if it's all alphanumeric.
*/ */
#ifndef BITCOIN_BASE58_H #ifndef BITCOIN_BASE58_H
#define BITCOIN_BASE58_H #define BITCOIN_BASE58_H

8
src/bloom.h

@ -32,14 +32,14 @@ enum bloomflags
/** /**
* BloomFilter is a probabilistic filter which SPV clients provide * BloomFilter is a probabilistic filter which SPV clients provide
* so that we can filter the transactions we sends them. * so that we can filter the transactions we send them.
* *
* This allows for significantly more efficient transaction and block downloads. * This allows for significantly more efficient transaction and block downloads.
* *
* Because bloom filters are probabilistic, an SPV node can increase the false- * Because bloom filters are probabilistic, a SPV node can increase the false-
* positive rate, making us send them transactions which aren't actually theirs, * positive rate, making us send it transactions which aren't actually its,
* allowing clients to trade more bandwidth for more privacy by obfuscating which * allowing clients to trade more bandwidth for more privacy by obfuscating which
* keys are owned by them. * keys are controlled by them.
*/ */
class CBloomFilter class CBloomFilter
{ {

2
src/chain.h

@ -74,7 +74,7 @@ enum BlockStatus {
*/ */
BLOCK_VALID_TRANSACTIONS = 3, BLOCK_VALID_TRANSACTIONS = 3,
//! Outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30. //! Outputs do not overspend inputs, no double spends, coinbase output ok, no immature coinbase spends, BIP30.
//! Implies all parents are also at least CHAIN. //! Implies all parents are also at least CHAIN.
BLOCK_VALID_CHAIN = 4, BLOCK_VALID_CHAIN = 4,

9
src/chainparams.cpp

@ -87,7 +87,7 @@ public:
/** /**
* The message start string is designed to be unlikely to occur in normal data. * The message start string is designed to be unlikely to occur in normal data.
* The characters are rarely used upper ASCII, not valid as UTF-8, and produce * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
* a large 4-byte int at any alignment. * a large 32-bit integer with any alignment.
*/ */
pchMessageStart[0] = 0xf9; pchMessageStart[0] = 0xf9;
pchMessageStart[1] = 0xbe; pchMessageStart[1] = 0xbe;
@ -99,9 +99,10 @@ public:
nPruneAfterHeight = 100000; nPruneAfterHeight = 100000;
/** /**
* Build the genesis block. Note that the output of the genesis coinbase cannot * Build the genesis block. Note that the output of its generation
* be spent as it did not originally exist in the database. * transaction cannot be spent since it did not originally exist in the
* * database.
*
* CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1) * CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
* CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0) * CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
* CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73) * CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)

6
src/chainparams.h

@ -62,7 +62,7 @@ public:
bool MiningRequiresPeers() const { return fMiningRequiresPeers; } bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
/** Default value for -checkmempool and -checkblockindex argument */ /** Default value for -checkmempool and -checkblockindex argument */
bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; } bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
/** Make standard checks */ /** Policy: Filter transactions that do not match well-defined patterns */
bool RequireStandard() const { return fRequireStandard; } bool RequireStandard() const { return fRequireStandard; }
int64_t PruneAfterHeight() const { return nPruneAfterHeight; } int64_t PruneAfterHeight() const { return nPruneAfterHeight; }
/** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */
@ -99,8 +99,8 @@ protected:
}; };
/** /**
* Return the currently selected parameters. This won't change after app startup * Return the currently selected parameters. This won't change after app
* outside of the unit tests. * startup, except for unit tests.
*/ */
const CChainParams &Params(); const CChainParams &Params();

4
src/chainparamsbase.h

@ -34,8 +34,8 @@ protected:
}; };
/** /**
* Return the currently selected parameters. This won't change after app startup * Return the currently selected parameters. This won't change after app
* outside of the unit tests. * startup, except for unit tests.
*/ */
const CBaseChainParams& BaseParams(); const CBaseChainParams& BaseParams();

7
src/checkpoints.cpp

@ -15,9 +15,10 @@
namespace Checkpoints { namespace Checkpoints {
/** /**
* How many times we expect transactions after the last checkpoint to * How many times slower we expect checking transactions after the last
* be slower. This number is a compromise, as it can't be accurate for * checkpoint to be (from checking signatures, which is skipped up to the
* every system. When reindexing from a fast disk with a slow CPU, it * last checkpoint). This number is a compromise, as it can't be accurate
* for every system. When reindexing from a fast disk with a slow CPU, it
* can be up to 20, while when downloading from a slow network with a * can be up to 20, while when downloading from a slow network with a
* fast multicore CPU, it won't be much higher than 1. * fast multicore CPU, it won't be much higher than 1.
*/ */

2
src/checkpoints.h

@ -11,7 +11,7 @@
class CBlockIndex; class CBlockIndex;
/** /**
* Block-chain checkpoints are compiled-in sanity checks. * Block-chain checkpoints are compiled-in sanity checks.
* They are updated every release or three. * They are updated every release or three.
*/ */

6
src/checkqueue.h

@ -54,7 +54,7 @@ private:
/** /**
* Number of verifications that haven't completed yet. * Number of verifications that haven't completed yet.
* This includes elements that are not anymore in queue, but still in * This includes elements that are no longer queued, but still in the
* worker's own batches. * worker's own batches.
*/ */
unsigned int nTodo; unsigned int nTodo;
@ -81,7 +81,7 @@ private:
fAllOk &= fOk; fAllOk &= fOk;
nTodo -= nNow; nTodo -= nNow;
if (nTodo == 0 && !fMaster) if (nTodo == 0 && !fMaster)
// We processed the last element; inform the master he or she can exit and return the result // We processed the last element; inform the master it can exit and return the result
condMaster.notify_one(); condMaster.notify_one();
} else { } else {
// first iteration // first iteration
@ -136,7 +136,7 @@ public:
Loop(); Loop();
} }
//! Wait until execution finishes, and return whether all evaluations where successful. //! Wait until execution finishes, and return whether all evaluations were successful.
bool Wait() bool Wait()
{ {
return Loop(true); return Loop(true);

4
src/init.cpp

@ -52,7 +52,7 @@ bool fFeeEstimatesInitialized = false;
#ifdef WIN32 #ifdef WIN32
// Win32 LevelDB doesn't use filedescriptors, and the ones used for // Win32 LevelDB doesn't use filedescriptors, and the ones used for
// accessing block files, don't count towards to fd_set size limit // accessing block files don't count towards the fd_set size limit
// anyway. // anyway.
#define MIN_CORE_FILEDESCRIPTORS 0 #define MIN_CORE_FILEDESCRIPTORS 0
#else #else
@ -334,7 +334,7 @@ strUsage += HelpMessageOpt("-reindex", _("Rebuild block chain index from current
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0)); strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0));
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1)); strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1));
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), 1)); strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), 1));
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)"), strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"),
FormatMoney(maxTxFee))); FormatMoney(maxTxFee)));
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup")); strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat")); strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));

45
src/main.cpp

@ -142,8 +142,9 @@ namespace {
uint32_t nBlockSequenceId = 1; uint32_t nBlockSequenceId = 1;
/** /**
* Sources of received blocks, to be able to send them reject messages or ban * Sources of received blocks, saved to be able to send them reject
* them, if processing happens afterwards. Protected by cs_main. * messages or ban them when processing happens afterwards. Protected by
* cs_main.
*/ */
map<uint256, NodeId> mapBlockSource; map<uint256, NodeId> mapBlockSource;
@ -389,7 +390,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
} }
// If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor // If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor
// of their current tip anymore. Go back enough to fix that. // of its current tip anymore. Go back enough to fix that.
state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock); state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock);
if (state->pindexLastCommonBlock == state->pindexBestKnownBlock) if (state->pindexLastCommonBlock == state->pindexBestKnownBlock)
return; return;
@ -941,7 +942,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// do all inputs exist? // do all inputs exist?
// Note that this does not check for the presence of actual outputs (see the next check for that), // Note that this does not check for the presence of actual outputs (see the next check for that),
// only helps filling in pfMissingInputs (to determine missing vs spent). // and only helps with filling in pfMissingInputs (to determine missing vs spent).
BOOST_FOREACH(const CTxIn txin, tx.vin) { BOOST_FOREACH(const CTxIn txin, tx.vin) {
if (!view.HaveCoins(txin.prevout.hash)) { if (!view.HaveCoins(txin.prevout.hash)) {
if (pfMissingInputs) if (pfMissingInputs)
@ -1277,8 +1278,8 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
pfork = pfork->pprev; pfork = pfork->pprev;
} }
// We define a condition which we should warn the user about as a fork of at least 7 blocks // We define a condition where we should warn the user about as a fork of at least 7 blocks
// who's tip is within 72 blocks (+/- 12 hours if no one mines it) of ours // with a tip within 72 blocks (+/- 12 hours if no one mines it) of ours
// We use 7 blocks rather arbitrarily as it represents just under 10% of sustained network // We use 7 blocks rather arbitrarily as it represents just under 10% of sustained network
// hash rate operating on the fork. // hash rate operating on the fork.
// or a chain that is entirely longer than ours and invalid (note that this should be detected by both) // or a chain that is entirely longer than ours and invalid (note that this should be detected by both)
@ -1719,9 +1720,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information. // See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information.
// This logic is not necessary for memory pool transactions, as AcceptToMemoryPool // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool
// already refuses previously-known transaction ids entirely. // already refuses previously-known transaction ids entirely.
// This rule was originally applied all blocks whose timestamp was after March 15, 2012, 0:00 UTC. // This rule was originally applied to all blocks with a timestamp after March 15, 2012, 0:00 UTC.
// Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the
// two in the chain that violate it. This prevents exploiting the issue against nodes in their // two in the chain that violate it. This prevents exploiting the issue against nodes during their
// initial block download. // initial block download.
bool fEnforceBIP30 = (!pindex->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash. bool fEnforceBIP30 = (!pindex->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash.
!((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256S("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) || !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256S("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) ||
@ -1984,7 +1985,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
if (nUpgraded > 100/2) if (nUpgraded > 100/2)
{ {
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
strMiscWarning = _("Warning: This version is obsolete, upgrade required!"); strMiscWarning = _("Warning: This version is obsolete; upgrade required!");
CAlert::Notify(strMiscWarning, true); CAlert::Notify(strMiscWarning, true);
fWarned = true; fWarned = true;
} }
@ -2315,7 +2316,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
} }
// The resulting new best tip may not be in setBlockIndexCandidates anymore, so // The resulting new best tip may not be in setBlockIndexCandidates anymore, so
// add them again. // add it again.
BlockMap::iterator it = mapBlockIndex.begin(); BlockMap::iterator it = mapBlockIndex.begin();
while (it != mapBlockIndex.end()) { while (it != mapBlockIndex.end()) {
if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) { if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) {
@ -3733,7 +3734,7 @@ void static ProcessGetData(CNode* pfrom)
pfrom->PushMessage("merkleblock", merkleBlock); pfrom->PushMessage("merkleblock", merkleBlock);
// CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see
// This avoids hurting performance by pointlessly requiring a round-trip // This avoids hurting performance by pointlessly requiring a round-trip
// Note that there is currently no way for a node to request any single transactions we didnt send here - // Note that there is currently no way for a node to request any single transactions we didn't send here -
// they must either disconnect and retry or request the full block. // they must either disconnect and retry or request the full block.
// Thus, the protocol spec specified allows for us to provide duplicate txn here, // Thus, the protocol spec specified allows for us to provide duplicate txn here,
// however we MUST always provide at least what the remote peer needs // however we MUST always provide at least what the remote peer needs
@ -3746,7 +3747,7 @@ void static ProcessGetData(CNode* pfrom)
// no response // no response
} }
// Trigger them to send a getblocks request for the next batch of inventory // Trigger the peer node to send a getblocks request for the next batch of inventory
if (inv.hash == pfrom->hashContinue) if (inv.hash == pfrom->hashContinue)
{ {
// Bypass PushInventory, this must send even if redundant, // Bypass PushInventory, this must send even if redundant,
@ -4060,7 +4061,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
if (inv.type == MSG_BLOCK) { if (inv.type == MSG_BLOCK) {
UpdateBlockAvailability(pfrom->GetId(), inv.hash); UpdateBlockAvailability(pfrom->GetId(), inv.hash);
if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) { if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
// First request the headers preceeding the announced block. In the normal fully-synced // First request the headers preceding the announced block. In the normal fully-synced
// case where a new block is announced that succeeds the current tip (no reorganization), // case where a new block is announced that succeeds the current tip (no reorganization),
// there are no such headers. // there are no such headers.
// Secondly, and only when we are close to being synced, we request the announced block directly, // Secondly, and only when we are close to being synced, we request the announced block directly,
@ -4142,8 +4143,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash()));
if (--nLimit <= 0) if (--nLimit <= 0)
{ {
// When this block is requested, we'll send an inv that'll make them // When this block is requested, we'll send an inv that'll
// getblocks the next batch of inventory. // trigger the peer to getblocks the next batch of inventory.
LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
pfrom->hashContinue = pindex->GetBlockHash(); pfrom->hashContinue = pindex->GetBlockHash();
break; break;
@ -4380,9 +4381,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// This asymmetric behavior for inbound and outbound connections was introduced // This asymmetric behavior for inbound and outbound connections was introduced
// to prevent a fingerprinting attack: an attacker can send specific fake addresses // to prevent a fingerprinting attack: an attacker can send specific fake addresses
// to users' AddrMan and later request them by sending getaddr messages. // to users' AddrMan and later request them by sending getaddr messages.
// Making users (which are behind NAT and can only make outgoing connections) ignore // Making nodes which are behind NAT and can only make outgoing connections ignore
// getaddr message mitigates the attack. // the getaddr message mitigates the attack.
else if ((strCommand == "getaddr") && (pfrom->fInbound)) else if ((strCommand == "getaddr") && (pfrom->fInbound))
{ {
pfrom->vAddrToSend.clear(); pfrom->vAddrToSend.clear();
@ -4467,7 +4468,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// Nonce mismatches are normal when pings are overlapping // Nonce mismatches are normal when pings are overlapping
sProblem = "Nonce mismatch"; sProblem = "Nonce mismatch";
if (nonce == 0) { if (nonce == 0) {
// This is most likely a bug in another implementation somewhere, cancel this ping // This is most likely a bug in another implementation somewhere; cancel this ping
bPingFinished = true; bPingFinished = true;
sProblem = "Nonce zero"; sProblem = "Nonce zero";
} }
@ -4476,7 +4477,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
sProblem = "Unsolicited pong without ping"; sProblem = "Unsolicited pong without ping";
} }
} else { } else {
// This is most likely a bug in another implementation somewhere, cancel this ping // This is most likely a bug in another implementation somewhere; cancel this ping
bPingFinished = true; bPingFinished = true;
sProblem = "Short payload"; sProblem = "Short payload";
} }
@ -4735,7 +4736,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
{ {
const Consensus::Params& consensusParams = Params().GetConsensus(); const Consensus::Params& consensusParams = Params().GetConsensus();
{ {
// Don't send anything until we get their version message // Don't send anything until we get its version message
if (pto->nVersion == 0) if (pto->nVersion == 0)
return true; return true;
@ -4919,7 +4920,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
// In case there is a block that has been in flight from this peer for (2 + 0.5 * N) times the block interval // In case there is a block that has been in flight from this peer for (2 + 0.5 * N) times the block interval
// (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to // (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to
// timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link // timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link
// being saturated. We only count validated in-flight blocks so peers can't advertize nonexisting block hashes // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
// to unreasonably increase our timeout. // to unreasonably increase our timeout.
if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * consensusParams.nPowTargetSpacing * (4 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) { if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * consensusParams.nPowTargetSpacing * (4 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id); LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id);

2
src/main.h

@ -75,7 +75,7 @@ static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;
/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */ /** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
static const unsigned int BLOCK_STALLING_TIMEOUT = 2; static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends /** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
* less than this number, we reached their tip. Changing this value is a protocol upgrade. */ * less than this number, we reached its tip. Changing this value is a protocol upgrade. */
static const unsigned int MAX_HEADERS_RESULTS = 2000; static const unsigned int MAX_HEADERS_RESULTS = 2000;
/** Size of the "block download window": how far ahead of our current height do we fetch? /** Size of the "block download window": how far ahead of our current height do we fetch?
* Larger windows tolerate larger download speed differences between peer, but increase the potential * Larger windows tolerate larger download speed differences between peer, but increase the potential

4
src/merkleblock.cpp

@ -119,8 +119,8 @@ uint256 CPartialMerkleTree::TraverseAndExtract(int height, unsigned int pos, uns
if (pos*2+1 < CalcTreeWidth(height-1)) { if (pos*2+1 < CalcTreeWidth(height-1)) {
right = TraverseAndExtract(height-1, pos*2+1, nBitsUsed, nHashUsed, vMatch); right = TraverseAndExtract(height-1, pos*2+1, nBitsUsed, nHashUsed, vMatch);
if (right == left) { if (right == left) {
// If the left and right branch should never be identical as the transaction // The left and right branches should never be identical, as the transaction
// hashes covered by them must be unique. // hashes covered by them must each be unique.
fBad = true; fBad = true;
} }
} else { } else {

2
src/merkleblock.h

@ -104,7 +104,7 @@ public:
} }
} }
/** Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them */ /** Construct a partial merkle tree from a list of transaction ids, and a mask that selects a subset of them */
CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch); CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
CPartialMerkleTree(); CPartialMerkleTree();

4
src/net.h

@ -271,8 +271,8 @@ public:
bool fDisconnect; bool fDisconnect;
// We use fRelayTxes for two purposes - // We use fRelayTxes for two purposes -
// a) it allows us to not relay tx invs before receiving the peer's version message // a) it allows us to not relay tx invs before receiving the peer's version message
// b) the peer may tell us in their version message that we should not relay tx invs // b) the peer may tell us in its version message that we should not relay tx invs
// until they have initialized their bloom filter. // until it has initialized its bloom filter.
bool fRelayTxes; bool fRelayTxes;
CSemaphoreGrant grantOutbound; CSemaphoreGrant grantOutbound;
CCriticalSection cs_filter; CCriticalSection cs_filter;

2
src/qt/askpassphrasedialog.cpp

@ -62,7 +62,7 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
break; break;
case ChangePass: // Ask old passphrase + new passphrase x2 case ChangePass: // Ask old passphrase + new passphrase x2
setWindowTitle(tr("Change passphrase")); setWindowTitle(tr("Change passphrase"));
ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet.")); ui->warningLabel->setText(tr("Enter the old passphrase and new passphrase to the wallet."));
break; break;
} }
textChanged(); textChanged();

20
src/qt/coincontroldialog.cpp

@ -129,11 +129,11 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
ui->treeWidget->setColumnWidth(COLUMN_DATE, 110); ui->treeWidget->setColumnWidth(COLUMN_DATE, 110);
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100); ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100); ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100);
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but don't show it
// default view is sorted by amount desc // default view is sorted by amount desc
sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder); sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder);
@ -408,8 +408,8 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
} }
// todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node // todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node
// including all childs are partially selected. But the parent node should be fully selected // including all children are partially selected. But the parent node should be fully selected
// as well as the childs. Childs should never be partially selected in the first place. // as well as the children. Children should never be partially selected in the first place.
// Please remove this ugly fix, once the bug is solved upstream. // Please remove this ugly fix, once the bug is solved upstream.
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
else if (column == COLUMN_CHECKBOX && item->childCount() > 0) else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
@ -635,15 +635,15 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l7->setStyleSheet((fDust) ? "color:red;" : ""); // Dust = "yes" l7->setStyleSheet((fDust) ? "color:red;" : ""); // Dust = "yes"
// tool tips // tool tips
QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />"; QString toolTip1 = tr("This label turns red if the transaction size is greater than 1000 bytes.") + "<br /><br />";
toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />"; toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />";
toolTip1 += tr("Can vary +/- 1 byte per input."); toolTip1 += tr("Can vary +/- 1 byte per input.");
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />"; QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />"; toolTip2 += tr("This label turns red if the priority is smaller than \"medium\".") + "<br /><br />";
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())); toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK()));
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546))); QString toolTip3 = tr("This label turns red if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
// how many satoshis the estimated fee can vary per byte we guess wrong // how many satoshis the estimated fee can vary per byte we guess wrong
double dFeeVary; double dFeeVary;

2
src/qt/optionsdialog.cpp

@ -208,7 +208,7 @@ void OptionsDialog::on_resetButton_clicked()
{ {
// confirmation dialog // confirmation dialog
QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"), QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shutdown, do you want to proceed?"), tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shut down. Do you want to proceed?"),
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
if(btnRetVal == QMessageBox::Cancel) if(btnRetVal == QMessageBox::Cancel)

4
src/qt/sendcoinsdialog.cpp

@ -505,7 +505,7 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
switch(sendCoinsReturn.status) switch(sendCoinsReturn.status)
{ {
case WalletModel::InvalidAddress: case WalletModel::InvalidAddress:
msgParams.first = tr("The recipient address is not valid, please recheck."); msgParams.first = tr("The recipient address is not valid. Please recheck.");
break; break;
case WalletModel::InvalidAmount: case WalletModel::InvalidAmount:
msgParams.first = tr("The amount to pay must be larger than 0."); msgParams.first = tr("The amount to pay must be larger than 0.");
@ -517,7 +517,7 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
msgParams.first = tr("The total exceeds your balance when the %1 transaction fee is included.").arg(msgArg); msgParams.first = tr("The total exceeds your balance when the %1 transaction fee is included.").arg(msgArg);
break; break;
case WalletModel::DuplicateAddress: case WalletModel::DuplicateAddress:
msgParams.first = tr("Duplicate address found, can only send to each address once per send operation."); msgParams.first = tr("Duplicate address found: addresses should only be used once each.");
break; break;
case WalletModel::TransactionCreationFailed: case WalletModel::TransactionCreationFailed:
msgParams.first = tr("Transaction creation failed!"); msgParams.first = tr("Transaction creation failed!");

2
src/qt/sendcoinsentry.cpp

@ -216,7 +216,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
ui->addAsLabel->clear(); ui->addAsLabel->clear();
ui->payTo->setText(recipient.address); // this may set a label from addressbook ui->payTo->setText(recipient.address); // this may set a label from addressbook
if (!recipient.label.isEmpty()) // if a label had been set from the addressbook, dont overwrite with an empty label if (!recipient.label.isEmpty()) // if a label had been set from the addressbook, don't overwrite with an empty label
ui->addAsLabel->setText(recipient.label); ui->addAsLabel->setText(recipient.label);
ui->payAmount->setValue(recipient.amount); ui->payAmount->setValue(recipient.amount);
} }

4
src/rpcserver.cpp

@ -912,8 +912,8 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
{ {
LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string()); LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string());
/* Deter brute-forcing /* Deter brute-forcing
If this results in a DoS the user really We don't support exposing the RPC port, so this shouldn't result
shouldn't have their RPC port exposed. */ in a DoS. */
MilliSleep(250); MilliSleep(250);
conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush; conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush;

10
src/wallet/wallet.cpp

@ -35,8 +35,8 @@ bool bSpendZeroConfChange = true;
bool fSendFreeTransactions = false; bool fSendFreeTransactions = false;
bool fPayAtLeastCustomFee = true; bool fPayAtLeastCustomFee = true;
/** /**
* Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
* Override with -mintxfee * Override with -mintxfee
*/ */
CFeeRate CWallet::minTxFee = CFeeRate(1000); CFeeRate CWallet::minTxFee = CFeeRate(1000);
@ -529,7 +529,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
delete pwalletdbEncryption; delete pwalletdbEncryption;
} }
// We now probably have half of our keys encrypted in memory, and half not... // We now probably have half of our keys encrypted in memory, and half not...
// die and let the user reload their unencrypted wallet. // die and let the user reload the unencrypted wallet.
assert(false); assert(false);
} }
@ -541,7 +541,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (!pwalletdbEncryption->TxnCommit()) { if (!pwalletdbEncryption->TxnCommit()) {
delete pwalletdbEncryption; delete pwalletdbEncryption;
// We now have keys encrypted in memory, but not on disk... // We now have keys encrypted in memory, but not on disk...
// die to avoid confusion and let the user reload their unencrypted wallet. // die to avoid confusion and let the user reload the unencrypted wallet.
assert(false); assert(false);
} }
@ -1097,7 +1097,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
void CWallet::ReacceptWalletTransactions() void CWallet::ReacceptWalletTransactions()
{ {
// If transcations aren't broadcasted, don't let them into local mempool either // If transactions aren't being broadcasted, don't let them into local mempool either
if (!fBroadcastTransactions) if (!fBroadcastTransactions)
return; return;
LOCK2(cs_main, cs_wallet); LOCK2(cs_main, cs_wallet);

Loading…
Cancel
Save