Commit graph

4877 commits

Author SHA1 Message Date
Cory Fields 50f71cd52e boost: code movement only: split CECKey into separate files 2014-10-27 15:00:58 -04:00
Cory Fields bdaec6abd3 boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48 2014-10-27 14:39:32 -04:00
Gavin Andresen 35ece7dd07
Merge pull request #5135
a31e8ba Make CBlockIndex* returned by GetDepthInMainChain const. (Daniel Kraft)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-27 13:42:01 -04:00
jtimon 99f41b9cf7 MOVEONLY: core.o -> core/block.o 2014-10-27 13:54:37 +01:00
jtimon 561e9e9de9 MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (from
core) with it
2014-10-27 13:54:37 +01:00
jtimon 999a2ab41e MOVEONLY: separate CTxUndo out of core 2014-10-27 13:54:37 +01:00
jtimon 4a3587d8db MOVEONLY: Separate CTransaction and dependencies from core 2014-10-27 13:54:37 +01:00
jtimon eda3733091 MOVEONLY: Move CFeeRate and Amount constants to amount.o 2014-10-27 13:54:37 +01:00
jtimon 071473c55c Build util and common before building server 2014-10-27 13:34:25 +01:00
Wladimir J. van der Laan 1bd8a7b2b9
Merge pull request #5086
1723862 build: fix libtool's refusal to link static libs into a dll (Cory Fields)
28d412f build: quit abusing LIBS for Windows builds. (Cory Fields)
2014-10-27 12:28:02 +01:00
Pieter Wuille 60abd463ac
Merge pull request #5119
fa73619 boost: split stream classes out of serialize.h (Cory Fields)
2014-10-27 04:16:48 -07:00
Wladimir J. van der Laan d9702bcf7c
Merge pull request #5115
33dfbf5 rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo` (Wladimir J. van der Laan)
2014-10-27 11:05:20 +01:00
Luke Dashjr 2aa632921e Enable customising node policy for datacarrier data size with a -datacarriersize option 2014-10-27 09:41:57 +00:00
Wladimir J. van der Laan 2ffdf21ce3
Merge pull request #5134
6261e6e getblockhash: throw JSONRPCError (not runtime_error) (dexX7)
2014-10-27 10:18:26 +01:00
Peter Todd 16d78bd68e Add valid invert of invalid every numeric opcode tests 2014-10-25 03:13:15 -07:00
Peter Todd 2b62e1796b Clearly separate PUSHDATA and numeric argument MINIMALDATA tests 2014-10-25 03:12:39 -07:00
Peter Todd dfeec18b85 Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule 2014-10-25 03:12:06 -07:00
Peter Todd 554147ad9e Ensure MINIMALDATA invalid tests can only fail one way
Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.
2014-10-25 03:11:38 -07:00
Peter Todd 6004e77b92 Improve CScriptNum() comment
Edited-by: Pieter Wuille <pieter.wuille@gmail.com>
2014-10-25 03:03:20 -07:00
Pieter Wuille 698c6abb25 Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)
Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
2014-10-25 03:03:20 -07:00
Pieter Wuille d752ba86c1 Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) 2014-10-25 03:03:16 -07:00
Pieter Wuille 65e4e8427d
Merge pull request #5093
4b0e2d7 Squashed 'src/leveldb/' changes from 7924331..7d41e6f (Pieter Wuille)
2014-10-25 02:39:56 -07:00
Michael Ford f2e03ffae9 Update comments in chainparams to be doxygen compatible 2014-10-25 17:24:16 +08:00
Michael Ford 2fdc3351d7 Update comments in chain to be doxygen compatible 2014-10-25 16:46:54 +08:00
Wladimir J. van der Laan b847e0139e
Merge pull request #5131
24f5c94 Update comments in addrman to be doxygen compatible (Michael Ford)
c772f4c Add doc/doxygen to .gitignore (Michael Ford)
2014-10-25 09:10:40 +02:00
Wladimir J. van der Laan 5c85fde550
Merge pull request #5117
7014f38 [Qt] Remove CAmount from BitcoinAmountField Q_PROPERTY (Cozz Lovan)
2014-10-25 08:36:26 +02:00
Cozz Lovan 7014f382e3 [Qt] Remove CAmount from BitcoinAmountField Q_PROPERTY 2014-10-24 23:43:27 +02:00
dexX7 6261e6e6e0
getblockhash: throw JSONRPCError (not runtime_error) 2014-10-24 19:18:03 +02:00
Daniel Kraft a31e8bad53 Make CBlockIndex* returned by GetDepthInMainChain const.
Make the CBlockIndex* (optionally) returned by GetDepthInMainChain
const.  This prevents accidental modification.  The result is for
reading its properties rather than modifying it.
2014-10-24 16:13:41 +02:00
Michael Ford 24f5c94015 Update comments in addrman to be doxygen compatible
Also correct the file license
2014-10-24 15:45:27 +08:00
Wladimir J. van der Laan 7c0f36c431
Clear vFixedSeeds for regtest network
It shouldn't inherit these from testnet.
(seems to be already done for unit test network but forgotten here...)
Fixes #5127.
2014-10-24 09:34:55 +02:00
Cory Fields 3a757c5294 fix build with libc++ after 85c579e 2014-10-23 14:24:22 -04:00
Wladimir J. van der Laan d2833de424
qt: remove monitoreddatamapper
We haven't used the viewModified signal in ages, so we can use a normal
QDataWidgetMapper.
2014-10-23 19:09:34 +02:00
Cory Fields fa7361907a boost: split stream classes out of serialize.h
serialization now has no dependencies.
2014-10-22 15:21:06 -04:00
Wladimir J. van der Laan 25cc1cf8dc
Merge pull request #4981
85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields)
db8eb54 script: move ToString and ValueString out of the header (Cory Fields)
e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields)
066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
2014-10-22 12:16:50 +02:00
Wladimir J. van der Laan 13bddef870
Merge pull request #4988
7b2bb96 Replace some function names with __func__ (Pieter Wuille)
ed6d1a2 Keep information about all block files in memory (Pieter Wuille)
2014-10-22 12:06:03 +02:00
Wladimir J. van der Laan f984c7d7ad
Merge pull request #5108
a873823 CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan)
fef24ca Add IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
2014-10-22 10:47:14 +02:00
Wladimir J. van der Laan 7305620599
Merge pull request #5110
a3c26c2 Fixes for missing boost tuple.hpp header include. (randy-waterhouse)
2014-10-22 10:37:52 +02:00
Wladimir J. van der Laan 93cb689e52
Merge pull request #5104
b7ae2c1 Chain::SetTip return type to void (21E14)
2014-10-22 10:24:16 +02:00
Wladimir J. van der Laan a873823864
CAutoFile: Explicit Get() and remove unused methods
Also add documentation to some methods.
2014-10-22 10:18:19 +02:00
Pieter Wuille 7b2bb96271 Replace some function names with __func__ 2014-10-21 16:17:13 -07:00
Wladimir J. van der Laan 33dfbf57d3
rpc: Fix leveldb iterator leak, and flush before gettxoutsetinfo
This fixes an iterator leak resulting in

    bitcoind: db/version_set.cc:789: leveldb::VersionSet::~VersionSet(): Assertion `dummy_versions_.next_ == &dummy_versions_' failed."

exception on shutdown.

Also make sure to flush pcoinsTip before calling GetStats() to make
sure we apply them to the current height.
2014-10-21 16:16:55 +02:00
Wladimir J. van der Laan 9acbb4180a
qt: small English language updates from translators
More friendly language, use placeholders where possible
2014-10-21 15:40:43 +02:00
Wladimir J. van der Laan 6d3ab8564c
qt: English translation update after 0a08aa8 2014-10-21 14:55:45 +02:00
Wladimir J. van der Laan 5f3ea3362a
Merge pull request #5076
c0195b1 Bugfix: Remove default from -zapwallettxes description (inaccurate) (Luke Dashjr)
0a08aa8 Parameterise command line option defaults, so translations are independent of them (Luke Dashjr)
2014-10-21 14:53:55 +02:00
Wladimir J. van der Laan b88cb1a96e
Merge pull request #5105
a96d113 Rename CWalletInterface to CValidationInterface (Pieter Wuille)
2014-10-21 11:56:10 +02:00
Luke Dashjr d29a2917ff Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock 2014-10-21 04:48:31 +00:00
Luke Dashjr f877aaaf16 Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check 2014-10-21 04:48:31 +00:00
Luke Dashjr 24e8896430 Add CValidationInterface::BlockChecked notification 2014-10-21 04:41:46 +00:00
randy-waterhouse a3c26c2e85 Fixes for missing boost tuple.hpp header include. 2014-10-21 17:33:06 +13:00
21E14 b7ae2c172a Chain::SetTip return type to void 2014-10-20 17:56:19 -04:00
Pieter Wuille a96d113962 Rename CWalletInterface to CValidationInterface
It's useful for much more than wallets.
2014-10-20 10:59:12 -07:00
Ruben Dario Ponticeli fef24cab1a Add IsNull() to class CAutoFile and remove operator ! 2014-10-20 12:46:56 +02:00
Wladimir J. van der Laan 64ffc995d6
Merge pull request #5095
d4746d5 Add a SECURE style flag for ThreadSafeMessageBox, which indicates that the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log. (Mark Friedenbach)
2014-10-20 11:36:40 +02:00
Cory Fields 85c579e3a6 script: add a slew of includes all around and drop includes from script.h
Lots of files ended up with indirect includes from script.h.
2014-10-17 13:44:57 -04:00
Cory Fields db8eb54bd7 script: move ToString and ValueString out of the header 2014-10-17 13:44:14 -04:00
Cory Fields e9ca4280f3 script: add ToByteVector() for converting anything with begin/end
This should move to a util header once their dependencies are cleaned up.
2014-10-17 13:44:14 -04:00
Cory Fields 066e2a1403 script: move CScriptID to standard.h and add a ctor for creating them from CScripts
This allows for a reversal of the current behavior.

This:
CScript foo;
CScriptID bar(foo.GetID());

Becomes:
CScript foo;
CScriptID bar(foo);

This way, CScript is no longer dependent on CScriptID or Hash();
2014-10-17 13:44:14 -04:00
Wladimir J. van der Laan 84d13eef88
Merge pull request #4468
e11b2ce Fix large reorgs (Pieter Wuille)
afc32c5 Fix rebuild-chainstate feature and improve its performance (Pieter Wuille)
16d5194 Skip reindexed blocks individually (Pieter Wuille)
ad96e7c Make -reindex cope with out-of-order blocks (Wladimir J. van der Laan)
e17bd58 Rename setBlockIndexValid to setBlockIndexCandidates (Pieter Wuille)
1af838b Add height to "Requesting block" debug (R E Broadley)
1bcee67 Better logging of stalling (R E Broadley)
4c93322 Improve getheaders (sending) logging (R E Broadley)
f244c99 Remove CheckMinWork, as we always know all parent headers (Pieter Wuille)
ad6e601 RPC additions after headers-first (Pieter Wuille)
341735e Headers-first synchronization (Pieter Wuille)
2014-10-17 12:30:54 +02:00
Wladimir J. van der Laan 971a3b46a3
Merge pull request #5092
6f155bd Add LIBTOOLFLAGS CXX tag to qt makefile include (Michael Ford)
2014-10-17 10:24:56 +02:00
Mark Friedenbach d4746d56c0 Add a SECURE style flag for ThreadSafeMessageBox, which indicates that the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log. 2014-10-17 00:33:31 -07:00
Wladimir J. van der Laan 494ff05a4c Merge pull request #4804 from jtimon/chainparams3
Remove CBaseChainParams::NetworkID()
2014-10-17 08:47:11 +02:00
jtimon e8ea0fd19e MOVEONLY: CInPoint from core to txmempool 2014-10-17 01:58:43 +02:00
jtimon ca3ce0fa03 squashme on 3fdb9e8c (Bluematt's bikeshedding) 2014-10-16 22:49:33 +02:00
Pieter Wuille 5b9f8425a5 Merge src/leveldb changes for LevelDB 1.18. 2014-10-16 12:23:50 -07:00
Michael Ford 6f155bdb80 Add LIBTOOLFLAGS CXX tag to qt makefile include
Related #4993
2014-10-16 19:50:49 +08:00
Cory Fields 5f4bcf6b14 boost: drop boost dependency in version.cpp.
Also add a test to verify.
2014-10-15 15:13:20 -04:00
Cory Fields 352058e8b0 boost: drop boost dependency in utilstrencodings.cpp 2014-10-15 15:13:20 -04:00
Cory Fields e1c9467766 boost: drop boost dependency in core.cpp 2014-10-15 15:13:20 -04:00
Cory Fields e405aa48c7 boost: remove CPrivKey dependency from CECKey
This allows CECKey to be used without directly depending on the secure
allocators
2014-10-15 15:13:20 -04:00
Cory Fields 52955068b7 boost: drop dependency on tuple in serialization
There's only one user of this form of serialization, so it can be easily
dropped. It could be re-added if desired when we switch to c++11.
2014-10-15 15:13:19 -04:00
Cory Fields 1d9b86d584 boost: drop dependency on is_fundamental in serialization
There's only one case where a vector containing a fundamental type is
serialized all-at-once, unsigned char. Anything else would lead to
strange results.

Use a dummy argument to overload in that case.
2014-10-15 15:13:19 -04:00
Pieter Wuille e11b2ce4c6 Fix large reorgs 2014-10-14 16:13:42 -07:00
Pieter Wuille afc32c5eea Fix rebuild-chainstate feature and improve its performance
Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.

Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
2014-10-14 15:42:01 -07:00
Pieter Wuille 16d5194165 Skip reindexed blocks individually
Instead of skipping to the last reindexed block in each file (which could
jump over processed out-of-order blocks), just skip each already processed
block individually.
2014-10-14 15:42:01 -07:00
Wladimir J. van der Laan ad96e7ccd9 Make -reindex cope with out-of-order blocks
Remember out-of-order block headers along with disk positions. This is
likely the simplest and least-impact way to make -reindex work with
headers first.

Based on top of #4468.
2014-10-14 15:42:01 -07:00
Pieter Wuille e17bd58392 Rename setBlockIndexValid to setBlockIndexCandidates 2014-10-14 15:42:01 -07:00
R E Broadley 1af838b339 Add height to "Requesting block" debug 2014-10-14 15:42:01 -07:00
R E Broadley 1bcee67ee7 Better logging of stalling 2014-10-14 15:42:01 -07:00
R E Broadley 4c93322923 Improve getheaders (sending) logging 2014-10-14 15:42:01 -07:00
Pieter Wuille f244c99c96 Remove CheckMinWork, as we always know all parent headers 2014-10-14 15:42:01 -07:00
Pieter Wuille ad6e601712 RPC additions after headers-first 2014-10-14 15:42:01 -07:00
Pieter Wuille 341735eb8f Headers-first synchronization
Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
  limited moving window. When one peer stalls the movement of the window, it is
  disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
  verified the headers, and store it to disk immediately. This means that a
  disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
  initial *headers* sync).
* Introduce some extra named constants, comments and asserts.
2014-10-14 15:42:01 -07:00
Luke Dashjr c0195b1c31 Bugfix: Remove default from -zapwallettxes description (inaccurate) 2014-10-14 20:13:44 +00:00
Wladimir J. van der Laan 992ab87114
Merge pull request #4942
9406471 Write fee estimate and peers files only when initialized (Wladimir J. van der Laan)
2014-10-14 11:35:17 +02:00
Cory Fields 28d412ff20 build: quit abusing LIBS for Windows builds.
Similar to the INCLUDES changes in 6b099402b4, split out LIBS into individual
entries for more fine-grained control.

Also add MINIUPNPC_LIBS which was missing before, and hook it up to
executables.
2014-10-13 21:21:27 -04:00
Luke e21b2e0d5f Typo in test 2014-10-13 16:57:09 +01:00
Wladimir J. van der Laan d7e1950483
Merge pull request #4937
ccca27a [Wallet] Watch-only fixes (Cozz Lovan)
2014-10-13 13:57:07 +02:00
jtimon ebdb9ff639 SQUASHME: fix "Reserve only one network specific cached path per session" 2014-10-11 20:56:27 +02:00
Luke Dashjr 0a08aa8f2a Parameterise command line option defaults, so translations are independent of them 2014-10-11 08:22:26 +00:00
Cory Fields d5fd094569 build: fix qt test build when libprotobuf is in a non-standard path 2014-10-10 13:03:28 -04:00
jtimon b796cb084b SQUASHME: NetworkIdFromCommandLine() function instead of method 2014-10-10 12:05:20 +02:00
Wladimir J. van der Laan 023690c0f2
Merge pull request #4802
6fd546d Remove CChainParams::NetworkID() (jtimon)
cc97210 Add fTestnetToBeDeprecatedFieldRPC to CChainParams (jtimon)
e11712d Move checkpoint data selection to chainparams (jtimon)
6de50c3 qt: add network-specific style object (Wladimir J. van der Laan)
2014-10-10 11:56:58 +02:00
jtimon 6fd546dd96 Remove CChainParams::NetworkID() 2014-10-10 11:01:00 +02:00
jtimon cc97210799 Add fTestnetToBeDeprecatedFieldRPC to CChainParams 2014-10-10 11:01:00 +02:00
jtimon e11712df7e Move checkpoint data selection to chainparams 2014-10-10 11:00:59 +02:00
Wladimir J. van der Laan 6de50c3c9a qt: add network-specific style object
Mainly cleanups: Gets rid of isTestNet everywhere, by keeping track
of network-specific theming in a central place.

Also makes GUI no longer dependent on the network ID enumeration, which
alleviates concerns about #4802.
2014-10-10 11:00:59 +02:00
Wladimir J. van der Laan fe36e031cd
Merge pull request #5032
4bd1185 Qt: allow "emergency" shutdown during startup (Philip Kaufmann)
2014-10-09 18:10:29 +02:00
Gavin Andresen 3222802ea1
Merge pull request #5059
dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen)
e01a793 Refactor -alertnotify code (Gavin Andresen)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-09 10:39:29 -04:00
Gavin Andresen dbca89b74b
Trigger -alertnotify if network is upgrading without you
This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.

Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.

And adds a forknotify.py regression test to make sure it works.

Tested using forknotify.py:

Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks

Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks

After final code in this pull:
Tests successful
2014-10-09 10:28:27 -04:00