Commit graph

4156 commits

Author SHA1 Message Date
Wladimir J. van der Laan 7b8fc9d8ad
Merge pull request #4436
675bcd5 Correct comment for 15-of-15 p2sh script size (Michael Ford)
2014-06-28 15:09:15 +02:00
Wladimir J. van der Laan c8b6c0a2cf
Merge pull request #4425
6ecf3ed Display unknown commands received. (R E Broadley)
2014-06-28 15:07:51 +02:00
Wladimir J. van der Laan 9125ef9421
Merge pull request #4398
86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann)
e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
2014-06-28 15:06:18 +02:00
Michael Ford 675bcd5892 Correct comment for 15-of-15 p2sh script size
The original comment forgets to account for the script push which will
need an OP_PUSHDATA2 + 2-bytes for the 513 script bytes.

props davecgh
fixes #4224
2014-06-28 20:57:46 +08:00
jtimon 645d497aa0 Replace HexBits with strprintf 2014-06-28 13:19:14 +02:00
Wladimir J. van der Laan ba81f45607
Merge pull request #3990
0dd5d3a Show only one zero instead of many when getblocks request received with a hashStop of uint256(0) (R E Broadley)
2014-06-28 10:16:09 +02:00
R E Broadley 6ecf3edfee Display unknown commands received. 2014-06-28 10:02:19 +07:00
R E Broadley 0dd5d3a009 Show only one zero instead of many when getblocks request received with a hashStop of uint256(0) 2014-06-28 09:55:24 +07:00
Tom Harding 7a19efe040 Formatting, spelling, comment fixes. 2014-06-27 16:47:33 -07:00
Wladimir J. van der Laan dfaa35d8cd
Merge pull request #4430
33c62c9 set shutdown title to main window title (Philip Kaufmann)
2014-06-27 18:53:11 +02:00
Tom Harding 9004798e62 Add -respendnotify option and new RPC data
-respendnotify=<cmd> Execute command when a network tx respends wallet
tx input (%s=respend TxID, %t=wallet TxID)

Add respendsobserved array to gettransaction, listtransactions, and
listsinceblock RPCs.  This omits the malleated clones that are included
in the walletconflicts array.

Add RPC help for respendsobserved and walletconflicts (help was missing
for the latter).
2014-06-27 07:54:21 -07:00
Tom Harding ada5a067c7 UI to alert of respend attempt affecting wallet.
Respend transactions that conflict with transactions already in the
wallet are added to it.  They are not displayed unless they also involve
the wallet, or get into a block.  If they do not involve the wallet,
they continue not to affect balance.

Transactions that involve the wallet, and have conflicting non-equivalent
transactions, are highlighted in red.  When the conflict first occurs, a
modal dialog is thrown.

CWallet::SyncMetaData is changed to sync only to equivalent transactions.

When a conflict is added to the wallet, counter nConflictsReceived is
incremented.  This acts like a change in active block height for the
purpose of triggering UI updates.
2014-06-27 07:54:21 -07:00
Tom Harding d640a3ceab Relay double-spends, subject to anti-DOS
Allows network wallets and other clients to see transactions that respend
a prevout already spent in an unconfirmed transaction in this node's mempool.

Knowledge of an attempted double-spend is of interest to recipients of the
first spend.  In some cases, it will allow these recipients to withhold
goods or services upon being alerted of a double-spend that deprives them
of payment.

As before, respends are not added to the mempool.

Anti-Denial-of-Service-Attack provisions:
 - Use a bloom filter to relay only one respend per mempool prevout
 - Rate-limit respend relays to a default of 100 thousand bytes/minute
 - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered
 - Do not relay these equivalent transactions

Remove an unused variable declaration in txmempool.cpp.
2014-06-27 07:54:21 -07:00
Tom Harding 8fbf03995d CBloomFilter::clear() method 2014-06-27 07:54:21 -07:00
Gavin Andresen 6259937388 Merge pull request #4365 from gavinandresen/relax_isstandard
Relax IsStandard rules for pay-to-script-hash transactions
2014-06-27 10:53:24 -04:00
Philip Kaufmann 33c62c9c0b set shutdown title to main window title
- this ensures we don't show Bitcoin-Qt as that is still our
  internal application name
- fixes #4427
2014-06-27 15:09:41 +02:00
Wladimir J. van der Laan 4684c883bb
Merge pull request #4208
6a5c124 [Qt] don't allow translation of our example btc address (Philip Kaufmann)
2014-06-27 12:46:49 +02:00
Philip Kaufmann 40a158e100 minor code format fix in rpc-related files 2014-06-27 11:13:25 +02:00
Wladimir J. van der Laan d77f761be9
Merge pull request #4288
ed5769f Move AcceptedConnection class to rpcserver.h. (Jeff Garzik)
854d013 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic (Jeff Garzik)
c912e22 RPC cleanup: Improve HTTP server replies (Jeff Garzik)
2014-06-27 10:03:19 +02:00
Jeff Garzik ed5769f536 Move AcceptedConnection class to rpcserver.h.
Also, add parens to HTTPReply() to assist readability.
2014-06-27 00:10:53 -04:00
Jeff Garzik 854d013012 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic 2014-06-26 23:32:18 -04:00
Jeff Garzik c912e22db0 RPC cleanup: Improve HTTP server replies
1) support varying content types
2) support only sending the header
3) properly deliver error message as content, if HTTP error
4) move AcceptedConnection class to header, for wider use
2014-06-26 23:32:18 -04:00
Jeff Garzik e35b37b1b8 RPC client: Simplify command line string-to-JSON-value conversion code
By default, all command line parameters are converted into JSON string
values.  There is no need to manually specify the incoming type.

A binary decision "parse as string or JSON?" is all that's necessary.

Convert to a simple class, initialized at runtime startup, which offers
a quick lookup to answer "parse as JSON?" conversion question.

Future parameter conversions need only to indicate the method name
and zero-based index of the parameter needing JSON parsing.
2014-06-26 22:18:30 -04:00
Whit J c598f2acdb Fixed captitalization in bitcoin-cli-res.rc 2014-06-26 18:31:40 -07:00
Huang Le caf6150e97 Use async name resolving to improve net thread responsiveness
In the LookupIntern(), things changed are:

  1. Call getaddrinfo_a() instead of getaddrinfo() if available, the former is a sync version of the latter;
  2. Try using inet_pton()/inet_addr() to convert the input text to a network addr structure at first, if success the extra name resolving thread inside getaddrinfo_a() could be avoided;
  3.  An interruption point added in the waiting loop for return from getaddrinfo_a(), which completes the improve for thread responsiveness.

A easy way to see the effect is to kick off a 'bitcoind stop' immediately after 'bitcoind -daemon', before the change it would take several, or even tens of, minutes on a bad network situation to wait for the running bitcoind to exit, now it costs only seconds.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-06-27 02:55:39 +08:00
Wladimir J. van der Laan 236ae8665e
Merge pull request #3715
e44fea5 Add an option to allow users to disable relaying/mining data carrier transactions (Luke Dashjr)
2014-06-26 17:31:12 +02:00
Wladimir J. van der Laan eacff4a9c6
Merge pull request #4392
8ae973c Allocate more space if necessary in RandSeedAddPerfMon (Wladimir J. van der Laan)
be873f6 Issue warning if collecting RandSeed data failed (Wladimir J. van der Laan)
fcb0a1b change "char pch[200000]" to "new char[200000]" (daniel)
2014-06-26 17:11:53 +02:00
Luke Dashjr e44fea55ea Add an option to allow users to disable relaying/mining data carrier transactions 2014-06-26 14:31:06 +00:00
Wladimir J. van der Laan ffb32acfab
Merge pull request #1583
2a72d45 JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee> (Luke Dashjr)
2014-06-26 16:20:01 +02:00
Wladimir J. van der Laan 8ae973c00c Allocate more space if necessary in RandSeedAddPerfMon
Currently we use a fixed buffer of 250000 bytes to request
HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the
entropy collection to be skipped.

Use a loop that grows the buffer as specified in the RegQueryValueEx
documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx

(as the size of the performance data can differ for every call, the
normal solution of requesting the size then allocating that can't work)
2014-06-26 15:15:17 +02:00
Luke Dashjr 2a72d4591f JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-26 11:49:46 +00:00
Philip Kaufmann cf04d83624 add OpenSSL RAND_cleanup() on OpenSSL shutdown
- to securely erase the memory used by the PNRG
- also rework 2 comments in OpenSSL init
2014-06-26 11:04:31 +02:00
Philip Kaufmann 5d59921237 add missing BOOST_FOREACH indentation in ThreadSocketHandler() 2014-06-26 11:01:24 +02:00
Philip Kaufmann 9e9ca2b671 small cleanup of #ifdefs in BindListenPort()
- SO_NOSIGPIPE isn't available on WIN32 so merge the 2 non-WIN32 blocks
- use predefined names from header for IPV6_PROTECTION_LEVEL and
  PROTECTION_LEVEL_UNRESTRICTED
2014-06-26 11:01:23 +02:00
Philip Kaufmann e10dcf27b4 ensure clean and consistent "namespace" usage
- remove some missplaced ;
- ensure end of a namespace is clearly visible
- use same formatting when using namespace
2014-06-26 10:36:57 +02:00
Gavin Andresen a90689ff98
Remove timing-based signature cache unit test
Two changes:

First removes a unit test that fails in my development environment
(OSX, compiled -g3 with clang).

sipa says that's not terribly surprising; the CMutableTransaction change
makes signing a little more expensive but verification quicker. The unit
test timed sign+verify-uncached versus verify-cached-five-times.

He also says the test will be invalid when libsec256kp1 is integrated
(because validation is super-optimized over signing).

core.h change fixes a compiler warning (clang -Wall : CMutableTransaction defined
as struct, declared as class in script.h).
2014-06-25 14:57:21 -04:00
gubatron 8969828d06 [Qt] New status bar Unit Display Control and related changes.
- New status bar control shows the current Unit of Display.
  When clicked (left,or right button) it shows a context menu
  that allows the user to switch the current Unit of Display (BTC, mBTC, uBTC)
- Recent Requests and Transaction Table headers are now updated when
  unit of display is changed, because their "Amount" column now displays the
  current unit of display.
- Takes care of issue #3970 Units in transaction export csv file.
- Small refactors for reusability.
- Demo Video https://www.youtube.com/watch?v=wwcr0Yh68go&list=UUG3jF2hgofmLWP0tRPisQAQ
- changes after Diapolo's feedback. Have not been able to build after last pool, issues with boost on MacOSX, will test on Ubuntu these changes.
- removed return statement on switch
- renamed onDisplayUnitsChanged(int) to updateDisplayUnit(int)
- now getAmountColumnTitle(int unit) takes a simple unit parameter. moved to BitcoinUnits.
2014-06-25 14:53:05 -04:00
Wladimir J. van der Laan 75c82d4923 Move coins.cpp and keystore.cpp to libbitcoin_common
Prepare for introduction of `bitcoin-tx` tool.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan 84ce18ca93 Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.

To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan 14f888ca80 Move network-time related functions to timedata.cpp/h
The network time-offset-mangement functions from util.cpp are moved to
timedata.(cpp|h). This breaks the dependency of util on netbase.
2014-06-25 09:24:50 +02:00
Wladimir J. van der Laan 208bf5b9e0
Merge pull request #3839
fd704c7 move pow constants to chainparams (jtimon)
df852d2 Refactor proof of work related functions out of main (jtimon)
2014-06-25 09:14:36 +02:00
Wladimir J. van der Laan 27383b9015
Merge pull request #4390
6dc90ed replace 3 separate calls to WSAGetLastError() with 1 (Philip Kaufmann)
2014-06-25 07:20:42 +02:00
Whit J e3aedbae9b Consistent lettering 2014-06-24 17:23:05 -07:00
Wladimir J. van der Laan 6e8472ec7c
Merge pull request #4403
5fbb4c9 [Qt] fix links in about window not opening (Philip Kaufmann)
2014-06-24 18:07:45 +02:00
Wladimir J. van der Laan 0410d11b3a
Merge pull request #4130
1c750db remove -tor compatibility code (only allow -onion) (Philip Kaufmann)
2014-06-24 17:51:32 +02:00
Wladimir J. van der Laan 5dd0bfefcb
Merge pull request #4169
0655fac miner: indentation fixes, remove for (;;) (Philip Kaufmann)
2014-06-24 17:17:13 +02:00
Wladimir J. van der Laan d4392c8989
Merge pull request #3674
77cbd46 Let -zapwallettxes recover transaction meta data (Cozz Lovan)
2014-06-24 17:04:52 +02:00
Philip Kaufmann 5fbb4c9b58 [Qt] fix links in about window not opening
- closes #4402
2014-06-24 16:36:14 +02:00
Philip Kaufmann 1c750dbd40 remove -tor compatibility code (only allow -onion)
- exit, if -tor option is found and give error to user
2014-06-24 16:07:20 +02:00
Philip Kaufmann 6dc90ed8fa replace 3 separate calls to WSAGetLastError() with 1 2014-06-24 08:46:12 +02:00
jtimon fd704c7b2c move pow constants to chainparams 2014-06-23 23:10:24 +02:00
jtimon df852d2bcc Refactor proof of work related functions out of main 2014-06-23 23:10:24 +02:00
Gavin Andresen 7f3b4e9569
Relax IsStandard rules for pay-to-script-hash transactions
Relax the AreInputsStandard() tests for P2SH transactions --
allow any Script in a P2SH transaction to be relayed/mined,
as long as it has 15 or fewer signature operations.

Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247

I don't have an easy way to test this, but the code changes are
straightforward and I've updated the AreInputsStandard unit tests.
2014-06-23 15:09:52 -04:00
Cory Fields f3967bcc50 build: fix build weirdness after 54372482.
bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.

Make the path explicit so that the old one cannot be found.

Core libs use config/bitcoin-config.h.

Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
2014-06-23 14:04:38 -04:00
Wladimir J. van der Laan be873f6454
Issue warning if collecting RandSeed data failed 2014-06-23 16:29:51 +02:00
Philip Kaufmann 6a5c124b84 [Qt] don't allow translation of our example btc address 2014-06-23 15:11:28 +02:00
Wladimir J. van der Laan a652787737
Merge pull request #4314
b3c912d [Qt] Change Coin control labels and tooltips because of non-rounding fees (Cozz Lovan)
2014-06-23 12:07:50 +02:00
daniel fcb0a1bb9c change "char pch[200000]" to "new char[200000]" 2014-06-23 11:59:58 +02:00
Wladimir J. van der Laan fa126effc2
Avoid undefined behavior using CFlatData in CScript serialization
`&vch[vch.size()]` and even `&vch[0]` on vectors can cause assertion
errors with VC in debug mode. This is the problem mentioned in #4239.
The deeper problem with this is that we rely on undefined behavior.

- Add `begin_ptr` and `end_ptr` functions that get the beginning and end
  pointer of vector in a reliable way that copes with empty vectors and
  doesn't reference outside the vector
(see https://stackoverflow.com/questions/1339470/how-to-get-the-address-of-the-stdvector-buffer-start-most-elegantly/1339767#1339767).
- Add a convenience constructor to CFlatData that wraps a vector.

I added `begin_ptr` and `end_ptr` as separate functions as I imagine
they will be useful in more places.
2014-06-23 10:38:15 +02:00
Wladimir J. van der Laan 52d4abfdef
Merge pull request #4388
3dc1464 add missing vhListenSocket.clear(); to CNetCleanup() (Philip Kaufmann)
2831a03 remove unused CNode::Cleanup() (Philip Kaufmann)
2014-06-23 10:21:38 +02:00
Wladimir J. van der Laan 82f2bba1ad
Merge pull request #4391
b612bde remove unneded class CNodeCombinedStats; from rpcconsole.cpp (Philip Kaufmann)
2014-06-23 10:01:07 +02:00
Philip Kaufmann b612bde521 remove unneded class CNodeCombinedStats; from rpcconsole.cpp
- also 2 small style fixes
2014-06-23 08:06:52 +02:00
Pieter Wuille d4e4e05435
Merge pull request #4309
d38da59 Code simplifications after CTransaction::GetHash() caching (Pieter Wuille)
4949004 Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
2014-06-22 20:45:30 +02:00
Pieter Wuille 6b40eabbcf
Merge pull request #4381
806fd19 Allocate receive buffers in on the fly (Pieter Wuille)
2014-06-22 17:43:40 +02:00
Philip Kaufmann 3dc1464f0a add missing vhListenSocket.clear(); to CNetCleanup() 2014-06-22 14:52:38 +02:00
Philip Kaufmann 2831a03b79 remove unused CNode::Cleanup() 2014-06-22 14:51:38 +02:00
Philip Kaufmann 0655fac0b1 miner: indentation fixes, remove for (;;)
- change a for (;;) into while (true), as we nowhere else use the first
- init nNonceFound to 0
- fix indentation in BitcoinMiner try/catch block
2014-06-22 00:33:42 +02:00
Pieter Wuille d38da59bf6 Code simplifications after CTransaction::GetHash() caching 2014-06-22 00:06:17 +02:00
Pieter Wuille 4949004d68 Add CMutableTransaction and make CTransaction immutable.
In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.
2014-06-21 22:59:03 +02:00
Pieter Wuille 8f59251b83
Merge pull request #4100
a0495bb Add <Hasher>::OUTPUT_SIZE (Pieter Wuille)
4791b99 crypto: create a separate lib for crypto functions (Cory Fields)
f2647cc crypto: explicitly check for byte read/write functions (Cory Fields)
5437248 build: move bitcoin-config.h to its own directory (Cory Fields)
3820e01 Extend and move all crypto tests to crypto_tests.cpp (Pieter Wuille)
7ecd973 Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible (Pieter Wuille)
a5bc9c0 Add built-in RIPEMD-160 implementation (Pieter Wuille)
13b5dfe Move crypto implementations to src/crypto/ (Pieter Wuille)
1cc344c Add built-in SHA-1 implementation. (Pieter Wuille)
85aab2a Switch miner.cpp to use sha2 instead of OpenSSL. (Pieter Wuille)
cf0c47b Remove getwork() RPC call (Pieter Wuille)
7b4737c Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. (Pieter Wuille)
977cdad Add a built-in SHA256/SHA512 implementation. (Pieter Wuille)
2014-06-21 22:52:46 +02:00
Jeff Garzik b4ccf0a5c7 Merge pull request #4379 from Diapolo/cleanup_compat
small cleanup in src/compat .h and .cpp
2014-06-21 16:29:12 -04:00
Pieter Wuille a0495bb68c Add <Hasher>::OUTPUT_SIZE 2014-06-21 19:47:43 +02:00
Cory Fields 4791b99e2d crypto: create a separate lib for crypto functions
This lib has no dependencies on other bitcoin functionality. Attempting to
use bitcoin headers will result in a failure to compile.
2014-06-21 19:47:43 +02:00
Cory Fields f2647cc0e9 crypto: explicitly check for byte read/write functions
Don't depend on hard-coded platform lists
2014-06-21 19:47:43 +02:00
Cory Fields 54372482a8 build: move bitcoin-config.h to its own directory
This allows us to include its path without making other header includes valid.
2014-06-21 19:47:43 +02:00
Pieter Wuille 3820e01eb9 Extend and move all crypto tests to crypto_tests.cpp 2014-06-21 19:47:43 +02:00
Pieter Wuille 7ecd9739d9 Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible 2014-06-21 19:47:42 +02:00
Pieter Wuille a5bc9c0917 Add built-in RIPEMD-160 implementation 2014-06-21 19:47:42 +02:00
Pieter Wuille 13b5dfef64 Move crypto implementations to src/crypto/ 2014-06-21 19:47:42 +02:00
Pieter Wuille 1cc344ce42 Add built-in SHA-1 implementation. 2014-06-21 19:47:39 +02:00
Pieter Wuille 85aab2a088 Switch miner.cpp to use sha2 instead of OpenSSL. 2014-06-21 19:47:39 +02:00
Pieter Wuille cf0c47b269 Remove getwork() RPC call 2014-06-21 19:47:39 +02:00
Pieter Wuille 7b4737c878 Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. 2014-06-21 19:47:39 +02:00
Pieter Wuille 977cdadea8 Add a built-in SHA256/SHA512 implementation.
This also moves the HMAC-SHA512 implementation to sha2.cpp.
2014-06-21 19:47:39 +02:00
Wladimir J. van der Laan 540ce6aa10
Merge pull request #4380
38405ac Add comment regarding experimental-use service bits (Peter Todd)
99ddc6c Add nLocalServices info to RPC getinfo (Peter Todd)
2014-06-21 19:26:18 +02:00
Peter Todd 38405ac141
Add comment regarding experimental-use service bits
As per mailing list discussion.
2014-06-21 11:43:23 -04:00
Peter Todd 99ddc6cb70 Add nLocalServices info to RPC getinfo
Also show full 64 bits of services. Previously service bits >32 that
were advertised just didn't show up at all.
2014-06-21 11:43:19 -04:00
Pieter Wuille 806fd19ecb Allocate receive buffers in on the fly 2014-06-21 17:00:38 +02:00
Philip Kaufmann fc0c07eb64 small cleanup in src/compat .h and .cpp
- add license header
- fix include guards
- fix indentation
2014-06-21 14:39:17 +02:00
Pavel Vasin ea3acaf383 AvailableCoins: acquire cs_main mutex
It's required when called from WalletModel
2014-06-20 16:32:57 +04:00
Wladimir J. van der Laan b8b98d5642
Merge pull request #4310
7a9e0b6 Move checkpoint based heuristic checks to AcceptBlockHeader (Pieter Wuille)
2014-06-19 14:38:45 +02:00
Wladimir J. van der Laan 6afa49329d rpc: Add acceptors only when listening succeeded 2014-06-19 08:19:52 +02:00
Wladimir J. van der Laan 33e5b42910 rpc: Ignore and log errors during cancel
Cancelling the RPC acceptors can sometimes result in an error about
a bad file descriptor.

As this is the shutdown sequence we need to continue nevertheless,
ignore these errors, log a warning and proceed.

Fixes #4352.
2014-06-19 08:19:46 +02:00
Wladimir J. van der Laan 9fe80a2ec8
Merge pull request #4334
6763018 [Qt] rename In:/Out: to Received/Sent in traffic tab (Philip Kaufmann)
2014-06-18 09:59:47 +02:00
Wladimir J. van der Laan b8e56aa8ef
Merge pull request #4339
92a6220 sanity: hook up sanity checks (Cory Fields)
679240d sanity: add libc/stdlib sanity checks (Cory Fields)
11404af sanity: autoconf check for sys/select.h (Cory Fields)
2014-06-18 09:52:50 +02:00
Wladimir J. van der Laan 5694d10781
Merge pull request #4346
1569353 Add `-stopafterblockimport` option (Wladimir J. van der Laan)
2014-06-17 14:51:15 +02:00
jtimon f6984e8141 Add "chain" to getmininginfo, improve help in getblockchaininfo 2014-06-17 13:11:36 +02:00
jtimon b82b7ec3dc Get rid of Params().RPCisTestNet() 2014-06-17 13:08:25 +02:00
Philip Kaufmann 1020f599f3 add comment to HelpMessage() to ensure alphabetical ordering
- also rename hmm to mode, to be consistent between .h and .cpp
2014-06-17 09:17:12 +02:00
Cory Fields 92a6220711 sanity: hook up sanity checks 2014-06-16 17:21:34 -04:00
Cory Fields 679240d0e9 sanity: add libc/stdlib sanity checks
These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
2014-06-16 17:21:34 -04:00
Cozz Lovan b3c912d93a [Qt] Change Coin control labels and tooltips because of non-rounding fees 2014-06-16 22:39:43 +02:00
Cozz Lovan 77cbd4623e Let -zapwallettxes recover transaction meta data 2014-06-16 18:56:57 +02:00
Wladimir J. van der Laan 09eb201b1b Remove using namespace std from header file
It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
2014-06-16 17:42:54 +02:00
Wladimir J. van der Laan 807691ca96
Merge pull request #4326
f5ae6c9 add NetworkIDString() to chainparams (Philip Kaufmann)
2014-06-16 17:41:27 +02:00
Wladimir J. van der Laan f73082db87
Merge pull request #4337
88df548 base58: add paranoid return value checks (Jeff Garzik)
2014-06-16 17:29:43 +02:00
Wladimir J. van der Laan 1569353b8a
Add -stopafterblockimport option
Stop after importing blocks. This can be useful for development
and trouble shooting.
2014-06-16 11:47:32 +02:00
Philip Kaufmann 6763018797 [Qt] rename In:/Out: to Received/Sent in traffic tab
- collides with In:/Out: used for displaying number of
  connections when translating
2014-06-16 08:23:45 +02:00
Wladimir J. van der Laan b750cf1fb9
Remove cli functionality from bitcoind
As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
2014-06-15 15:38:22 +02:00
Jeff Garzik 0cafb63025
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant
A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-06-15 14:47:04 +02:00
kevin 33cc907dfb Add DNS seed of open-nodes.org 2014-06-15 15:35:53 +08:00
Wladimir J. van der Laan 8615bfb486
Merge pull request #4316
18116b0 Ignore too-long redeemScripts while loading wallet (Wladimir J. van der Laan)
2014-06-14 11:32:03 +02:00
Wladimir J. van der Laan 8047fb04ed
Merge pull request #4193
71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)
2014-06-12 16:47:48 +02:00
Wladimir J. van der Laan fe1f417287
Merge pull request #4281
5c97aae qt: Unify AboutDialog and HelpMessageDialog (Wladimir J. van der Laan)
45615af Add 'about' information to `-version` output (Wladimir J. van der Laan)
97789d3 util: Add function FormatParagraph to format paragraph to fixed-width (Wladimir J. van der Laan)
96b733e Add `-version` option to get just the version (Wladimir J. van der Laan)
2014-06-12 16:42:55 +02:00
Wladimir J. van der Laan 5c97aae6da qt: Unify AboutDialog and HelpMessageDialog
They share so much code and functionality that they may as well
be one class.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan 45615af26f Add 'about' information to -version output
Adds a copyright and attribution message to the `-version` output
(the same as shown in the About dialog in the GUI).

Move the message to a function LicenseInfo in init.cpp.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan 18116b06c1 Ignore too-long redeemScripts while loading wallet
This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
2014-06-12 15:28:41 +02:00
Wladimir J. van der Laan e5ee8f016e
Remove -beta suffix
It conflicts with our normal naming of releases/builds. Fixes #4221.
2014-06-12 13:52:15 +02:00
Philip Kaufmann f5ae6c9826 add NetworkIDString() to chainparams
- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
  and functions
2014-06-12 13:19:12 +02:00
Wladimir J. van der Laan 3f39b9d455
Merge pull request #2784
f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
2014-06-12 12:40:09 +02:00
Jeff Garzik 88df548dde base58: add paranoid return value checks 2014-06-11 23:20:37 -04:00
Andreas Schildbach c30329adfa Add testnet DNS seed of Alex Kotenko. 2014-06-12 00:36:53 +02:00
Philip Kaufmann f3790472f0 remove unused code from getblockchaininfo() 2014-06-11 14:56:08 +02:00
Wladimir J. van der Laan 97789d374c util: Add function FormatParagraph to format paragraph to fixed-width
This is to be used for the `-version` and `-help` messages.
2014-06-11 14:27:09 +02:00
Wladimir J. van der Laan 96b733e996 Add -version option to get just the version
Adds a `-version` or `--version` option to print just the version
of the program for bitcoind, bitcoin-cli and bitcoin-qt.

Also make it that `-help` can be used to display the help (as well as
existing `--help`). Up to now, `-help` was the only option that didn't
work with either one or two dashes.
2014-06-11 14:22:50 +02:00
Wladimir J. van der Laan 9c8d2f6df0
Merge pull request #4227
634bd61 convert an if into an else if in OpenNetworkConnection() (Philip Kaufmann)
5bd6c31 small cleanup of net (Philip Kaufmann)
2014-06-11 13:01:11 +02:00
Philip Kaufmann 634bd61b76 convert an if into an else if in OpenNetworkConnection() 2014-06-11 12:40:13 +02:00
Philip Kaufmann 5bd6c31bd6 small cleanup of net
- remove an unneded else in ConnectNode()
- make 0 a double and change to 0.0 in ConnectNode()
- rename strDest to pszDest in OpenNetworkConnection()
- remove an unneded call to our REF() macro in BindListenPort()
- small style cleanups and removal of unneeded new-lines
2014-06-11 12:38:31 +02:00
Philip Kaufmann 4aaa01783d rework help messages for fee-related options
- mention the units and show the default for -paytxfee
2014-06-11 12:16:26 +02:00
Philip Kaufmann 56b07d2dcd [Qt] allow setting listen via GUI
- add DEFAULT_LISTEN in net.h and use in the code (shared
  setting between core and GUI)

Important: This makes it obvious, that we need to re-think the
settings/options handling, as GUI settings are processed before
any parameter-interaction (which is mostly important for network
stuff) in AppInit2()!
2014-06-11 12:04:17 +02:00
Wladimir J. van der Laan 5905d71fe3
Merge pull request #4170
ac14bcc small formatting, indentation and comment fixes (Philip Kaufmann)
2014-06-11 11:31:00 +02:00
Wladimir J. van der Laan d01574f792
Merge pull request #4277
4a09e1d key.cpp: fail with a friendlier message on missing ssl EC support (Andrew Poelstra)
2014-06-11 08:34:25 +02:00
Wladimir J. van der Laan 4e45932659
Merge pull request #4321
699fe63 remove wrong ; in chainparams.h and order includes (Philip Kaufmann)
2014-06-11 08:26:20 +02:00
Wladimir J. van der Laan 40c3781365
Merge pull request #4323
38e324a build: qt: split locale resources. Fixes non-deterministic distcheck (Cory Fields)
2014-06-11 08:16:23 +02:00
Cory Fields 38e324af86 build: qt: split locale resources. Fixes non-deterministic distcheck
The rcc tool is quirky and only honors files in the same directory as the qrc.
When doing an out-of-tree build (as 'make distcheck' does), the generated
translation files end up in a different path, so rcc can't find them.

Split them up so that rcc is run twice: once for static source files and once
for generated files.
2014-06-10 15:53:21 -04:00
Philip Kaufmann 699fe635c6 remove wrong ; in chainparams.h and order includes 2014-06-10 19:33:12 +02:00
Philip Kaufmann 1c24187b51 remove unused UPnP code from main.h 2014-06-10 18:34:35 +02:00
Philip Kaufmann ac14bcc1f1 small formatting, indentation and comment fixes
- contains zero code changes
2014-06-10 18:23:56 +02:00
Wladimir J. van der Laan 6dd5edb7de
Remove unused Print/PrintHex functions
You can just use HexStr(script) or script.ToString() for debugging, no
need for these extra functions.
2014-06-10 15:03:21 +02:00
Wladimir J. van der Laan 588fb4e82f
Merge pull request #4305
95a9383 [Qt] Remove CENT-fee-rule from coin control completely (Cozz Lovan)
2014-06-10 10:42:42 +02:00
Pieter Wuille f1920e8606 Ping automatically every 2 minutes (unconditionally)
... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
2014-06-09 23:06:56 +02:00
Wladimir J. van der Laan 6741837233
Merge pull request #4300
dff0e3b [Qt] Improve rpc console history behavior (Cozz Lovan)
2014-06-09 12:58:56 +02:00
Wladimir J. van der Laan 62fdf381fa
Merge pull request #3824
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon)
2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon)
c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon)
a3d946e Get rid of TestNet() (jtimon)
6fc0fa6 Add RPCisTestNet chain parameter (jtimon)
cfeb823 Add RequireStandard chain parameter (jtimon)
21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon)
d754f34 Move majority constants to chainparams (jtimon)
8d26721 Get rid of RegTest() (jtimon)
cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon)
2595b9a Add DefaultMinerThreads chain parameter (jtimon)
bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon)
1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-09 12:52:29 +02:00
Pieter Wuille 18e72167dd Push cs_mains down in ProcessBlock 2014-06-09 02:21:15 +02:00
Pieter Wuille 202e01941c Move all post-chaintip-change notifications to ActivateBestChain 2014-06-09 02:21:15 +02:00
Pieter Wuille 4e0eed88ac Allow ActivateBestChain to release its lock on cs_main 2014-06-09 02:21:15 +02:00
Pieter Wuille 77339e5aec Get rid of the static chainMostWork (optimization) 2014-06-09 02:21:15 +02:00
Pieter Wuille 7a9e0b6460 Move checkpoint based heuristic checks to AcceptBlockHeader 2014-06-09 01:27:56 +02:00
Cozz Lovan 95a93836d8 [Qt] Remove CENT-fee-rule from coin control completely 2014-06-08 01:48:11 +02:00
Drak 02bec4b268 Fix compiler warnings
Fixes the following compiler warning

```
miner.cpp: In constructor ‘COrphan::COrphan(const CTransaction*)’:
miner.cpp:69:14: warning: ‘COrphan::feeRate’ will be initialized after [-Wreorder]
     CFeeRate feeRate;
              ^
miner.cpp:68:12: warning:   ‘double COrphan::dPriority’ [-Wreorder]
     double dPriority;
            ^
miner.cpp:71:5: warning:   when initialized here [-Wreorder]
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
```
2014-06-07 12:57:58 +01:00