Commit graph

5213 commits

Author SHA1 Message Date
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
Peter Todd
ba7fcc8de0
Discourage fee sniping with nLockTime 2014-10-13 08:18:06 -04: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
Gavin Andresen
e01a7939d3
Refactor -alertnotify code
Refactor common -alertnotify code into static CAlert::Notify method.
2014-10-09 10:25:30 -04:00
Pieter Wuille
dec58922d0
Merge pull request #4996
d0c4197 change exit(1) to an assert in CWallet::EncryptWallet (Philip Kaufmann)
870da77 fix possible memory leaks in CWallet::EncryptWallet (Philip Kaufmann)
f606bb9 fix a possible memory leak in CWalletDB::Recover (Philip Kaufmann)
2014-10-08 15:51:32 -07:00
Pieter Wuille
9df9cf5a9f Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
2014-10-08 15:42:29 -07:00
Pieter Wuille
d4a42334d4
Merge pull request #4834
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille)
ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille)
058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille)
c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille)
f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
2014-10-08 14:58:16 -07:00
Wladimir J. van der Laan
6860a55ea0
Merge pull request #4979
de10efd add -timeout default as constant and use them (Philip Kaufmann)
2014-10-08 09:16:19 +02:00
Wladimir J. van der Laan
ad9cd64d3b
Merge pull request #5055
2c930d9 Prettify JSON tests and minimize diffs (Pieter Wuille)
2014-10-08 09:12:39 +02:00
Wladimir J. van der Laan
7c6cbff0e5
Merge pull request #4976
27c3e91 qt: add proxy to options overridden if necessary. (Cory Fields)
2014-10-07 12:33:45 +02:00
Wladimir J. van der Laan
3eaa9462f8
Merge pull request #5047
3e61eb9 minor txindex documentation improvement (Cozz Lovan)
2014-10-07 10:17:05 +02:00
Pieter Wuille
2c930d932b Prettify JSON tests and minimize diffs 2014-10-07 09:41:33 +02:00
Wladimir J. van der Laan
953f16cb4e
Merge pull request #4954
9d7cd4c Don't return an address for invalid pubkeys (Andy Alness)
2014-10-07 08:51:20 +02:00
Andy Alness
9d7cd4c598 Don't return an address for invalid pubkeys 2014-10-06 21:54:34 -04:00
Cozz Lovan
3e61eb9c51 minor txindex documentation improvement 2014-10-06 18:52:51 +02:00
Philip Kaufmann
de10efd154 add -timeout default as constant and use them
- update help message text
- simplify code in init to check for -timeout
2014-10-06 13:13:25 +02:00
Philip Kaufmann
4dc5eb057c fix a lock indentation in main.cpp
- also ensure alphabetical ordering in file header
2014-10-06 13:04:02 +02:00
Philip Kaufmann
5eed8c21c7 minor license, header end comment etc. cleanup in /script
- ensure all licenses are just MIT
- add a missing header end comment
- ensure alphabetical ordering
2014-10-06 13:00:55 +02:00
Pieter Wuille
ed6d1a2c7b Keep information about all block files in memory 2014-10-06 07:32:00 +02:00
Wladimir J. van der Laan
5505a1b13f
Merge pull request #5036
eb6b3b2 Update English translation (Wladimir J. van der Laan)
b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)
2014-10-06 04:42:09 +02:00
Wladimir J. van der Laan
5f1aee066a
Merge pull request #4890
e790c37 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker (Pieter Wuille)
5c1e798 Make signature cache optional (Pieter Wuille)
c7829ea Abstract out SignatureChecker (Pieter Wuille)
2014-10-06 04:39:17 +02:00
Wladimir J. van der Laan
cd91ed4f5f
Merge pull request #4982
b5ec5fe update getnetworkinfo help with subversion (Philip Kaufmann)
2014-10-03 15:27:58 +02:00
Pieter Wuille
5ccd735d30
Merge pull request #4887
4bb30a1 Correct logging AcceptBlock()->AcceptBlockHeader() (R E Broadley)
2014-10-03 04:31:44 +02:00
Cozz Lovan
ccca27a788 [Wallet] Watch-only fixes 2014-10-03 04:29:51 +02:00
Wladimir J. van der Laan
29f96e8bc6
Merge pull request #4994
54510f2 DRY: Avoid repetitions in script_test (jtimon)
2014-10-02 22:41:54 +02:00
Wladimir J. van der Laan
0e64566a82
Merge pull request #4978
938bcce CAutoFile: make file private (Philip Kaufmann)
0c35486 CBufferedFile: add explicit close function (Philip Kaufmann)
c9fb27d CBufferedFile: convert into a non-refcounted RAII wrapper (Philip Kaufmann)
2014-10-02 22:35:36 +02:00
Wladimir J. van der Laan
eb6b3b245c Update English translation 2014-10-02 22:20:23 +02:00
Wladimir J. van der Laan
b9b2e3fabd Don't translate state.Abort() messages
There is only one message passed to AbortNode() that makes sense to
translate to the user specifically: Disk space is low. For the others
show a generic message and refer to debug.log for details.

Reduces the number of confusing jargon translation messages.
2014-10-02 22:20:16 +02:00
jtimon
54510f2672 DRY: Avoid repetitions in script_test 2014-10-02 21:48:29 +02:00
Pieter Wuille
e790c370b5 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker 2014-10-02 20:26:58 +02:00
Pieter Wuille
5c1e798a8e Make signature cache optional 2014-10-02 20:26:17 +02:00
Pieter Wuille
c7829ea797 Abstract out SignatureChecker 2014-10-02 20:26:16 +02:00
R E Broadley
4bb30a1eb8 Correct logging AcceptBlock()->AcceptBlockHeader() 2014-10-03 01:35:51 +08:00
Wladimir J. van der Laan
20a4b69360
Merge pull request #4985
bc470c4 Changed mixed indentation to four spaces (Eric Shaw)
31d6390 Fixed setaccount accepting foreign address (Eric Shaw)
2014-10-02 19:31:50 +02:00
Eric Shaw
bc470c43ee Changed mixed indentation to four spaces
Put `test/rpc_wallet_tests.cpp` through clang-format.
2014-10-02 19:23:30 +02:00
Eric Shaw
31d6390fd1 Fixed setaccount accepting foreign address
Fixed issue #4209 where using setaccount with a foreign
address causes the address to be added to your receiving addresses.
2014-10-02 19:21:46 +02:00
Wladimir J. van der Laan
45c41c05a0
Merge pull request #5030
fbd36d8 Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan)
f0fd00c Switch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
2014-10-02 15:28:27 +02:00
Wladimir J. van der Laan
fbd36d8fb5
Avoid introducing a virtual into CChainParams
Treat fSkipProofOfWorkCheck the same as other parameters.
2014-10-02 13:54:26 +02:00
SergioDemianLerner
f0fd00cb77 Switch testing framework from MAIN to new UNITTEST network
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-10-02 13:51:39 +02:00
Philip Kaufmann
4bd1185280 Qt: allow "emergency" shutdown during startup
- allows closing our splash screen to abort startup
2014-10-02 11:26:36 +02:00
Philip Kaufmann
e2efdf3937 amount.h: update license, add header end comment + rem from util.h 2014-10-02 11:25:21 +02:00
Philip Kaufmann
938bccebf1 CAutoFile: make file private 2014-10-02 10:59:28 +02:00
Philip Kaufmann
0c35486dc9 CBufferedFile: add explicit close function
- also use identical close function for CAutoFile (avoids setting file to
  NULL under wrong conditions)
2014-10-02 10:56:10 +02:00
Philip Kaufmann
c9fb27da0a CBufferedFile: convert into a non-refcounted RAII wrapper
- it now takes over the passed file descriptor and closes it in the
  destructor
- this fixes a leak in LoadExternalBlockFile(), where an exception could
  cause the file to not getting closed

- disallow copies (like recently added for CAutoFile)
- make nType and nVersion private
2014-10-02 10:46:31 +02:00
Wladimir J. van der Laan
8d132431b4
Revert merge of pull #4845
It breaks the new mingw tests!

See

- https://travis-ci.org/bitcoin/bitcoin/jobs/36845581
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845582

This reverts commit 4705902777, 5e2e7fcb99, a25fd6be13.
2014-10-02 10:39:55 +02:00
Wladimir J. van der Laan
ad51e14583
Merge pull request #4845
4705902 Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan)
5e2e7fc Suggested corrections on comments, variable names. Also new test case testing the PoW skip in UNITTEST. (SergioDemianLerner)
a25fd6b Switch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
2014-10-02 09:47:54 +02:00
Wladimir J. van der Laan
00eef5d6e9
Merge pull request #5017
f74fc9b Print input index when signature validation fails, to aid debugging. (Mark Friedenbach)
217a5c9 When transaction outputs exceed inputs, show the offending amounts so as to aid debugging. (Mark Friedenbach)
2014-10-02 08:44:08 +02:00
Pieter Wuille
76c171033c
Merge pull request #4926
584a358 Do merkle root and txid duplicates check simultaneously (Pieter Wuille)
2014-10-02 06:10:19 +02:00
Pieter Wuille
471d38b015
Merge pull request #4980
20a11ff minor variable init changes in init.cpp (Philip Kaufmann)
2014-10-02 04:29:01 +02:00
Mark Friedenbach
f74fc9b22d Print input index when signature validation fails, to aid debugging. 2014-10-01 19:14:38 +02:00
Mark Friedenbach
217a5c9238 When transaction outputs exceed inputs, show the offending amounts so as to aid debugging. 2014-10-01 19:14:38 +02:00
Wladimir J. van der Laan
1fbccda8d0
Merge pull request #4940
62e5f8f CMessageHeader sanity changes (Wladimir J. van der Laan)
2014-10-01 13:28:16 +02:00
Wladimir J. van der Laan
a419f82670
Merge pull request #5022
c375b5c remove dead/unused code in walletdb.cpp (Philip Kaufmann)
2014-10-01 12:56:11 +02:00
Wladimir J. van der Laan
3fd192f8b4
Merge pull request #4234
c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan)
a372168 Use a typedef for monetary values (Mark Friedenbach)
2014-10-01 11:28:55 +02:00
Wladimir J. van der Laan
c122f5528c qt: Register CAmount metatype
This allows sending the type over queued connections.
Also normalize signal/slot names.
2014-10-01 11:06:41 +02:00
Philip Kaufmann
c375b5c102 remove dead/unused code in walletdb.cpp
- closes #5021
2014-10-01 11:00:29 +02:00
Philip Kaufmann
b5ec5fe0cb update getnetworkinfo help with subversion
- add missing subversion field to getnetworkinfo help
- fix style and format errors in help string
- remove unneeded int casts
2014-10-01 10:23:00 +02:00
Wladimir J. van der Laan
a6f3e9d843
Merge pull request #5014
41d67c7 tests: fix python test-runner for windows (Cory Fields)
2014-10-01 08:55:34 +02:00
Philip Kaufmann
d0c4197ef6 change exit(1) to an assert in CWallet::EncryptWallet 2014-10-01 08:50:24 +02:00
Philip Kaufmann
870da77da6 fix possible memory leaks in CWallet::EncryptWallet
- add missing deletes for pwalletdbEncryption
- add an assert before trying to reserve memory for pwalletdbEncryption
- add a destructor to CWallet, which ensures deletion of
  pwalletdbEncryption on object destruction
2014-10-01 08:48:23 +02:00
Philip Kaufmann
f606bb9baf fix a possible memory leak in CWalletDB::Recover
- convert pdbCopy into a boost::scoped_ptr to ensure memory gets freed
  in all cases (e.g. after "ret > 0")
2014-10-01 08:48:22 +02:00
Gavin Andresen
e5836eb692 Merge pull request #5015 from theuni/win64test
tests: fix false-positive under win64
2014-09-30 19:54:08 -04:00
Cory Fields
63c17613ab tests: fix false-positive under win64
BN_ULONG isn't necessarily an unsigned long, as is the case on win64.
2014-09-30 18:16:14 -04:00
Cory Fields
41d67c78bf tests: fix python test-runner for windows
Windows needed a few fixups to get the tests running:
1. bitcoin-tx needs a file extension in Windows. Take this opportunity to
   add an env file, which pulls variables out of our build config. This can
   be extended as needed, for now it's very simple.
2. After #1, split the args out of the exec key in the test data.
3. Correct the line-endings from windows stdout
2014-09-30 16:26:22 -04:00
Pieter Wuille
a329097f92
Merge pull request #4990
7bec6dd cleanup license and header end comment in chain.cpp/.h (Philip Kaufmann)
0db65d8 update license of compat and crypto (Philip Kaufmann)
2014-09-30 01:35:11 +02:00
Pieter Wuille
68af7d02cf Fix vector out of bounds in script tests 2014-09-29 19:26:23 +02:00
Pieter Wuille
2884b9a4ae
Merge pull request #4960
8138cbe Add automatic script test generation, and actual checksig tests (Pieter Wuille)
2014-09-29 18:36:04 +02:00
Wladimir J. van der Laan
4705902777 Avoid introducing a virtual into CChainParams
Treat fSkipProofOfWorkCheck the same as other parameters.
2014-09-29 13:13:47 +02:00
SergioDemianLerner
5e2e7fcb99 Suggested corrections on comments, variable names.
Also new test case testing the PoW skip in UNITTEST.
2014-09-29 13:03:23 +02:00
SergioDemianLerner
a25fd6be13 Switch testing framework from MAIN to new UNITTEST network
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-09-29 13:03:22 +02:00
Wladimir J. van der Laan
41150d601d
Merge pull request #4970
93e24dd travis: use debug for one build (Cory Fields)
be6d87a script: don't read past the end (Cory Fields)
a94496f tests: don't split an empty string (Cory Fields)
00522cd depends: disable reduced exports for debug builds (Cory Fields)
1f7fff2 depends: add docs for debug (Cory Fields)
dc66ff5 depends: make LDFLAGS act like the other flags (Cory Fields)
b1efba8 depends: give miniupnpc cppflags (Cory Fields)
1d154db depends: teach qt to honor debug/release (Cory Fields)
3b63df5 depends: boost: build for debug or release as requested (Cory Fields)
7e99df7 depends: make sure openssl sees cppflags (Cory Fields)
f397304 depends: add debug/release flags for linux/osx/win (Cory Fields)
2027ad3 depends: add the debug/release concept to depends (Cory Fields)
2014-09-29 09:36:54 +02:00
Wladimir J. van der Laan
76182e7cb6
Merge pull request #4999
775b7b8 LLu is standard, but not portable. use ULL (sinetek)
2014-09-29 09:35:47 +02:00
Philip Kaufmann
7bec6dd230 cleanup license and header end comment in chain.cpp/.h 2014-09-29 08:22:03 +02:00
Philip Kaufmann
0db65d8798 update license of compat and crypto
- change license to be just MIT for all files in compat and crypto
- also add missing header end comments
- ensure default header include style
2014-09-29 08:21:11 +02:00
Pieter Wuille
bf3a5dd7f0
Merge pull request #4796
e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon)
6db83db Decouple CChain from mapBlockIndex (jtimon)
2014-09-29 06:06:57 +02:00
sinetek
775b7b8d70 LLu is standard, but not portable. use ULL 2014-09-28 18:22:44 -04:00
Mark Friedenbach
a372168e77 Use a typedef for monetary values 2014-09-26 15:42:04 -07:00
Pieter Wuille
8138cbea3c Add automatic script test generation, and actual checksig tests 2014-09-26 21:58:48 +02:00
Pieter Wuille
64cfaf891f
Merge pull request #4986
6eb67b0 autofile: Disallow by-value copies of CAutoFile (Cory Fields)
eee030f autofile: don't copy CAutoFile by value (Cory Fields)
2014-09-26 20:31:18 +02:00
Pieter Wuille
610a3d3a1b
Merge pull request #4983
d14d7de SanitizeString: allow '(' and ')' (Wladimir J. van der Laan)
2014-09-26 19:36:08 +02:00
Pieter Wuille
c2db599c1f
Merge pull request #4977
cf42c36 Apply clang-format on crypto/* and compat/* (Pieter Wuille)
2014-09-26 19:31:18 +02:00
Cory Fields
6eb67b0ed2 autofile: Disallow by-value copies of CAutoFile
One might assume that CAutoFile would be ref-counted so that a copied object
would delay closing the underlying file until all copies have gone out of
scope. Since that's not the case with CAutoFile, explicitly disable copying.
2014-09-26 13:27:40 -04:00
Cory Fields
eee030f6bc autofile: don't copy CAutoFile by value 2014-09-25 19:25:19 -04:00
Cory Fields
27c3e91014 qt: add proxy to options overridden if necessary.
If proxy is disabled in the gui but enabled via the command line, it needs to
be added to the override list.
2014-09-25 17:47:32 -04:00
Cory Fields
be6d87aa60 script: don't read past the end 2014-09-25 14:56:26 -04:00
Cory Fields
a94496fbb6 tests: don't split an empty string 2014-09-25 14:56:26 -04:00
Wladimir J. van der Laan
4b2b78b9f2
Merge pull request #4969
cda45b5 Reinitializing list's begin iterator after few elements were erased from the head (ENikS)
2014-09-25 15:58:56 +02:00
ENikS
1e73504865
Fixing C4146 warning
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-09-25 15:24:36 +02:00
Philip Kaufmann
20a11ffabf minor variable init changes in init.cpp
- explicit init of pcoinsdbview and pwalletMain (even if not needed, as
  globals are init to NULL, it seems cleaner)
- remove check if (pwalletMain) in Shutdown() as delete is valid even if
  pwalletMain is NULL
2014-09-25 13:49:49 +02:00
Wladimir J. van der Laan
d14d7deff0 SanitizeString: allow '(' and ')'
'(' and ')' are valid in user agent strings, so should be reported
as such in RPC `getpeerinfo`.

Fixes #4537.
2014-09-25 12:45:46 +02:00
Wladimir J. van der Laan
b50e5fe099
Merge pull request #4968
219372f script: Fix reference into empty vector run time exception (ENikS)
2014-09-25 11:48:33 +02:00
ENikS
219372f1dd
script: Fix reference into empty vector run time exception
Edit by laanwj: `begin_ptr(sourcedata) + sourcedata.size()` -> `end_ptr(sourcedata)`
2014-09-25 11:46:52 +02:00
Wladimir J. van der Laan
375cb4c253
Merge pull request #4959
bb26e2c [Qt] minor changes in splashscreen.cpp (Philip Kaufmann)
2014-09-25 11:31:53 +02:00
Wladimir J. van der Laan
8152f4efd8
Merge pull request #4967
459a2d2 Avoiding referencing elements of an empty vector (ENikS)
2014-09-25 11:31:10 +02:00
Wladimir J. van der Laan
82e370b4b0
Merge pull request #4782
2e5361b remove code below asserts in limitedmap.h (fixes a ToDo) (Philip Kaufmann)
2014-09-25 11:21:43 +02:00
Wladimir J. van der Laan
29a9d4483e
Merge pull request #4966
c8063b5 Fixing out of bounds asses error (ENikS)
2014-09-25 10:21:01 +02:00
Jeff Garzik
ff36cbe8d0 RPC getnetworkinfo: export local node's client sub-version string 2014-09-25 10:09:21 +02:00
Philip Kaufmann
e6beedc496 [Qt] add more NULL pointer checks in bitcoingui
- add missing checks for clientModel and optionsModel
- small cleanups for an #ifdef on Mac
- remove an unneeded else
2014-09-25 09:16:45 +02:00
Pieter Wuille
cf42c36e99 Apply clang-format on crypto/* and compat/* 2014-09-25 08:23:32 +02:00
Pieter Wuille
584a358997 Do merkle root and txid duplicates check simultaneously
Move the txid duplicates check into BuildMerkleTree, where it can be done
much more efficiently (without needing to build a full txid set to detect
duplicates).

The previous version (using the std::set<uint256> to detect duplicates) was
also slightly too weak. A block mined with actual duplicate transactions
(which is invalid, due to the inputs of the duplicated transactions being
seen as double spends) would trigger the duplicates logic, resulting in the
block not being stored on disk, and rerequested. This change fixes that by
only triggering in the case of duplicated transactions that can actually
result in an identical merkle root.
2014-09-24 19:17:02 +02:00
Pieter Wuille
7c70438dc6 Get rid of the dummy CCoinsViewCache constructor arg 2014-09-24 03:19:04 +02:00
ENikS
cda45b5131 Reinitializing list's begin iterator after few elements were erased from the head 2014-09-23 18:33:16 -04:00
Pieter Wuille
ed27e53c9b Add coins_tests with a large randomized CCoinViewCache test. 2014-09-23 22:29:45 +02:00
Pieter Wuille
058b08c147 Do not keep fully spent but unwritten CCoins entries cached.
Instead of storing CCoins entries directly in CCoinsMap, store a CCoinsCacheEntry
which additionally keeps track of whether a particular entry is:
* dirty: potentially different from its parent view.
* fresh: the parent view is known to not have a non-pruned version.

This allows us to skip non-dirty cache entries when pushing batches of changes up,
and to remove CCoins entries about transactions that are fully spent before the
parent cache learns about them.
2014-09-23 22:29:43 +02:00
Pieter Wuille
c9d1a81ce7 Get rid of CCoinsView's SetCoins and SetBestBlock.
All direct modifications are now done through ModifyCoins, and BatchWrite is
used for pushing batches of queued modifications up, so we don't need the
low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
2014-09-23 22:29:21 +02:00
Pieter Wuille
f28aec014e Use ModifyCoins instead of mutable GetCoins.
Replace the mutable non-copying GetCoins method with a ModifyCoins, which
returns an encapsulated iterator, so we can keep track of concurrent
modifications (as iterators can be invalidated by those) and run cleanup
code after a modification is finished.

This also removes the overloading of the 'GetCoins' name.
2014-09-23 22:29:12 +02:00
Pieter Wuille
7a04f3d708
Merge pull request #4955
87314c1 Fixing improper input syntax and failing bounds check (ENikS)
2014-09-23 20:20:58 +02:00
ENikS
459a2d25e0 Avoiding referencing elements of an empty vector 2014-09-23 11:54:12 -04:00
ENikS
c8063b5712 Fixing out of bounds asses error 2014-09-23 11:17:43 -04:00
Wladimir J. van der Laan
35ee2dac67
Merge pull request #4949
c8589bf Add actual signature tests (Pieter Wuille)
76ec867 Use actually valid transactions for script tests (Pieter Wuille)
2014-09-23 13:14:19 +02:00
Peter Todd
426a74ed3c
Add scriptPubKey field to validateaddress RPC call 2014-09-23 05:24:27 -04:00
ENikS
6f3ae9b5df Fixing out of bounds error in GetKey() 2014-09-23 10:45:04 +02:00
Philip Kaufmann
bb26e2c896 [Qt] minor changes in splashscreen.cpp
- guard an unused variable with Q_UNUSED() macro
- remove a commented out line of code
2014-09-23 09:56:46 +02:00
Pieter Wuille
c8589bf99e Add actual signature tests 2014-09-22 19:26:17 +02:00
Pieter Wuille
76ec867796 Use actually valid transactions for script tests 2014-09-22 19:26:17 +02:00
Wladimir J. van der Laan
3cdae61aa2
Merge pull request #4787
4b0deb3 Clean up CMerkleTx::SetMerkleBranch. (Daniel Kraft)
2014-09-22 14:18:54 +02:00
Wladimir J. van der Laan
565da68ed0
Merge pull request #4852
5e83bc4 [Qt] include and file header cleanup (Philip Kaufmann)
2014-09-22 12:20:36 +02:00
Wladimir J. van der Laan
321fd7dbee
Merge pull request #4947
6134b43 Fixing condition 'sabotaging' MSVC build (ENikS)
2014-09-22 10:34:12 +02:00
Wladimir J. van der Laan
aa340a8f07
Merge pull request #4951
d6712db Also create pid file in non-daemon mode (Wladimir J. van der Laan)
2014-09-22 10:32:21 +02:00
Wladimir J. van der Laan
cfc5cfb0f0
qt: Make splash and shutdown window ignore close events
It's strange to be able to close these windows while there is work
in progress.

Also set Qt::WA_DeleteOnClose on both windows to make sure that they
are deleted eventually, no matter what happens.
2014-09-22 10:13:52 +02:00
Philip Kaufmann
2e5361b9c2 remove code below asserts in limitedmap.h (fixes a ToDo) 2014-09-22 09:35:40 +02:00
Wladimir J. van der Laan
6b09bc45b1
Merge pull request #4941
a49f11d qt: Change splash screen to normal window (Wladimir J. van der Laan)
2014-09-22 09:33:34 +02:00
Wladimir J. van der Laan
5547f08ec7
Merge pull request #4952
01c2807 Add warning about the merkle-tree algorithm duplicate txid flaw (Peter Todd)
2014-09-22 09:03:59 +02:00
ENikS
87314c1c5e Fixing improper input syntax and failing bounds check 2014-09-21 21:18:48 -04:00
Wladimir J. van der Laan
ae9966ed85
Merge pull request #4950
33a2771 test: Fix DoS tests after c74332c (Wladimir J. van der Laan)
2014-09-21 21:25:25 +02:00
jtimon
3fdb9e8c15 Remove CBaseChainParams::NetworkID() 2014-09-21 21:25:15 +02:00
jtimon
f297479a19 Reserve only one network specific cached path per session 2014-09-21 21:21:09 +02:00
Pieter Wuille
934b153a2c
Merge pull request #4933
20e01b1 Apply clang-format on some infrequently-updated files (Pieter Wuille)
2014-09-21 01:10:14 +02:00
Peter Todd
01c28073ba
Add warning about the merkle-tree algorithm duplicate txid flaw
Lots of people read the Bitcoin Core codebase to learn more about
crypto; better to warn about flaws explicitly so they don't blindly copy
the code for other uses and create broken systems.
2014-09-20 13:23:44 -04:00
Wladimir J. van der Laan
d6712db354
Also create pid file in non-daemon mode
Always make a pid file, not only when `-daemon` specified.

This is useful for troubleshooting, for attaching debuggers and loggers
and such.

- Write the pid file only after the datadir lock was acquired
- Don't create or remove a pid file on WIN32, and also don't show the option
2014-09-20 11:03:59 +02:00
Wladimir J. van der Laan
33a27716fc
test: Fix DoS tests after c74332c
Fix data structure mismatch ... The mind boggles that they were still passing at all.
2014-09-20 09:55:14 +02:00
Pieter Wuille
25308337d6
Merge pull request #4835
ab15b2e Avoid copying undo data (Pieter Wuille)
2014-09-20 05:11:09 +02:00
ENikS
6134b43ba9 Fixing condition 'sabotaging' MSVC build 2014-09-19 18:29:58 -04:00
Pieter Wuille
20e01b1a03 Apply clang-format on some infrequently-updated files 2014-09-19 19:21:46 +02:00
ENikS
018cec7c41 Fixing 'vector out of bounds' issue in base 32 and 64 2014-09-18 16:57:01 -04:00
Wladimir J. van der Laan
94064710b9 Write fee estimate and peers files only when initialized
Fixes #4669.

Move the loading of addresses to StartNode() to make it more
self-contained.
2014-09-18 14:20:18 +02:00
Philip Kaufmann
5e83bc404c [Qt] include and file header cleanup
- alphabetical ordering
- correct ordering own headers before normal headers etc.
2014-09-18 14:11:44 +02:00
Wladimir J. van der Laan
a49f11d9ed qt: Change splash screen to normal window
Makes it possible to move, minimize, unminimize the window while
Bitcoin Core is initializing.
2014-09-18 13:21:26 +02:00
Wladimir J. van der Laan
7fd8813675
Merge pull request #4667
bbad683 [Qt] simplify return code and return values in txtablemodel (Philip Kaufmann)
21f1516 [Qt] add all used colors in txtablemodel to guiconstants (Philip Kaufmann)
2014-09-18 12:08:46 +02:00
Wladimir J. van der Laan
62e5f8f961 CMessageHeader sanity changes
- Remove spurious `pchCommand[1] = 1` in CMessageHeader()
- Make sure that pchCommand is zero-padded if length is shorter than
  COMMAND_SIZE
- Use strnlen to determine length of pcmCommand in GetCommand
2014-09-18 10:15:48 +02:00
Wladimir J. van der Laan
c14bfea8ee
Merge pull request #4936
c15e483 typo fix of booleamn to boolean (imharrywu)
2014-09-18 09:50:21 +02:00
Philip Kaufmann
93f84d0417 cleanup class private and public areas in walletdb
- only code movement
2014-09-18 07:21:49 +02:00
Philip Kaufmann
22d7e7014f prefer const string& over char* in CDB and CWalletDB constructor
- also make parameter of CDBEnv::CheckpointLSN a constant reference
2014-09-18 07:21:49 +02:00
imharrywu
c15e483f23 typo fix of booleamn to boolean 2014-09-18 08:15:09 +08:00
Pieter Wuille
ab15b2ec71 Avoid copying undo data 2014-09-17 20:38:20 +02:00
Wladimir J. van der Laan
438c7e4cd2
Merge pull request #4555
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon)
2b23a87 Don't pass nHashType to VerifyScript (jtimon)
ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon)
358562b Remove unused function main:VerifySignature (jtimon)
2014-09-17 13:44:22 +02:00
Wladimir J. van der Laan
5b9d1e10a8
Merge pull request #4863
1a61396 fix missing gettransaction entries in rpcclient (Benedict Chan)
57e1716 update rpc help message for gettransaction to add includeWatchonly param (Benedict Chan)
2014-09-17 13:05:41 +02:00
Wladimir J. van der Laan
69dd8c919a
Merge pull request #4899
0be990b Move CTxDestination from script/script to script/standard (Pieter Wuille)
2014-09-17 13:04:54 +02:00
Pieter Wuille
651a1fcf81
Merge pull request #4927
ee304b6 minor changes for help message of getpeerinfo (Philip Kaufmann)
2014-09-16 21:25:51 +02:00
Pieter Wuille
0be990ba34 Move CTxDestination from script/script to script/standard 2014-09-16 19:14:32 +02:00
Pieter Wuille
ab3834baae
Merge pull request #4928
e9992fb remove include of chainparams.h (imharrywu)
2014-09-16 19:10:32 +02:00
Pieter Wuille
13168ea46c
Merge pull request #4903
efad808 Avoid reject message feedback loops (Pieter Wuille)
2014-09-16 18:54:46 +02:00
Wladimir J. van der Laan
cf04923618
Merge pull request #4930
f4fe205 add nModSize init to default constructor of CTxMemPoolEntry (Philip Kaufmann)
2014-09-16 15:21:24 +02:00
Philip Kaufmann
f4fe205034 add nModSize init to default constructor of CTxMemPoolEntry 2014-09-16 15:07:45 +02:00
Benedict Chan
1a613963e1 fix missing gettransaction entries in rpcclient 2014-09-16 11:12:01 +00:00
Benedict Chan
57e1716de6 update rpc help message for gettransaction to add includeWatchonly param 2014-09-16 11:12:01 +00:00
Wladimir J. van der Laan
6fc1dc1a32
Merge pull request #4719
52a5f90 Create the common location for all m4 autotool build scripts, build-aux/m4.
2014-09-16 12:00:18 +02:00
randy-waterhouse
52a5f90360 Create the common location for all m4 autotool build scripts, build-aux/m4.
Update .gitignore.
2014-09-16 11:55:15 +02:00
Wladimir J. van der Laan
f010344156
Merge pull request #4460
604ee2a Remove tx from AlreadyAskedFor list once we receive it, not when we process it. (R E Broadley)
2014-09-16 11:31:54 +02:00
Wladimir J. van der Laan
edb1eebabc
Merge pull request #4853
2605b94 [Qt] update form files for setting autoDefault explicitly to false (Philip Kaufmann)
2014-09-16 10:49:47 +02:00
imharrywu
e9992fb645 remove include of chainparams.h
chainparams.h has not been used in this cpp file already, consider to remove it for clean.
2014-09-16 15:53:04 +08:00
Philip Kaufmann
ee304b6e35 minor changes for help message of getpeerinfo 2014-09-16 09:00:36 +02:00
Pieter Wuille
dc54e9db98
Merge pull request #4825
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
2014-09-16 04:47:55 +02:00
Pieter Wuille
7388b74cd2
Merge pull request #4911
611116d header include cleanup (Philip Kaufmann)
2014-09-16 04:12:52 +02:00
Pieter Wuille
765f398436
Merge pull request #4875
f7e3637 Eliminate extra assignment (Suhas Daftuar)
ec7eb0f When reindexing check for file before trying to open (refactored) (Suhas Daftuar)
2014-09-16 03:21:21 +02:00
Wladimir J. van der Laan
327dcfece7 Merge pull request #4869
6050ab6 netbase: Make SOCKS5 negotiation interruptible (Wladimir J. van der Laan)
2014-09-15 17:25:12 +02:00
Suhas Daftuar
f7e36370f3 Eliminate extra assignment 2014-09-15 09:56:10 -04:00
ENikS
ec91092df8
Fixing compiler warning C4101
Github-Pull: #4856
2014-09-15 14:35:32 +02:00
Wladimir J. van der Laan
c362c57568
Merge pull request #4798
d920f7d Move g_signals.SetBestChain(..) below SyncWithWallets (Cozz Lovan)
2014-09-15 10:32:59 +02:00
Pieter Wuille
2ec82e94e6
Merge pull request #4817
c26649f Track modified size in TxMemPoolEntry so that we can correctly compute priority. (Alex Morcos)
2014-09-15 07:29:04 +02:00
Jeff Garzik
a0a8700bc8
Merge pull request #4909 2014-09-14 19:27:22 -04:00
Philip Kaufmann
611116d4e3 header include cleanup
- ensures alphabetical ordering for includes etc. in source file headers
2014-09-14 12:43:56 +02:00
Philip Kaufmann
2d79bba36b cleanup new script files (no code changes)
- add missing header end comments
- ensure alphabetical ordering
- update copyright year and license
2014-09-14 12:25:38 +02:00
Luke Dashjr
a65e320747 bitcoin-util-test: Test bitcoin-tx with null scriptPubKey 2014-09-14 06:28:22 +00:00
Luke Dashjr
15ef1b905b Bugfix: bitcoin-tx: scriptPubKey may be null, so accept outscript=<n>: 2014-09-14 05:28:41 +00:00
jtimon
6dcfda2dc4 Don't pass nHashType to EvalScript nor CheckSig 2014-09-12 20:04:31 +02:00
jtimon
2b23a87599 Don't pass nHashType to VerifyScript 2014-09-12 20:04:31 +02:00
jtimon
ce3649fb61 Remove CScriptCheck::nHashType (was always 0) 2014-09-12 20:03:03 +02:00
jtimon
358562b651 Remove unused function main:VerifySignature 2014-09-12 20:03:03 +02:00
Pieter Wuille
b9307d2f55
Merge pull request #4876
6022b5d Make script_{valid,invalid}.json validation flags configurable (Pieter Wuille)
2014-09-12 18:33:02 +02:00
Pieter Wuille
efad808aae Avoid reject message feedback loops 2014-09-12 17:50:31 +02:00
Wladimir J. van der Laan
3fa1c81b94
Merge pull request #4885
aa3c697 Store fewer orphan tx by default, add -maxorphantx option (Gavin Andresen)
c74332c Stricter handling of orphan transactions (Gavin Andresen)
2014-09-11 14:46:27 +02:00
Gavin Andresen
aa3c697e90
Store fewer orphan tx by default, add -maxorphantx option
There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.

This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.
2014-09-10 14:09:40 -04:00
Gavin Andresen
c74332c678
Stricter handling of orphan transactions
Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.
2014-09-10 14:09:40 -04:00
Suhas Daftuar
ec7eb0fa80 When reindexing check for file before trying to open (refactored) 2014-09-10 13:51:53 -04:00
Adam Weiss
e982b574a5 Use explicit fflush() instead of setvbuf()
Flushing after every line when printing to console is desirable when
running with systemd but setvbuf() has slightly different semantics
on Windows that causes warnings.  Just do an explicit fflush() after
each line print to console instead.
2014-09-10 12:48:13 -04:00
Gavin Andresen
def2fdb4b9
Fix crashing bug caused by orphan(s) with duplicate prevout.hash 2014-09-10 16:53:54 +02:00
Wladimir J. van der Laan
d6af9856b0
Merge pull request #4878
540ac45 Avoid returning many "inv" orphans (Jeff Garzik)
d4168c8 Limit CNode::mapAskFor (Wladimir J. van der Laan)
2014-09-10 16:52:57 +02:00
Wladimir J. van der Laan
f23869e14b
Merge pull request #4623
e84843c Broken addresses on command line no longer trigger testnet. (Ross Nicoll)
2014-09-10 15:07:58 +02:00
jtimon
c1e433b717 Rename scriptutils.o to wallet_ismine.o 2014-09-10 12:48:35 +02:00
jtimon
8b59a3d366 Move CAffectedKeysVisitor to wallet.cpp (remove ExtractAffectedKeys) 2014-09-10 12:44:43 +02:00
jtimon
0d2fa14a34 Move scriptutils.o to wallet 2014-09-10 12:42:56 +02:00
Wladimir J. van der Laan
6050ab6855 netbase: Make SOCKS5 negotiation interruptible
Avoids that SOCKS5 negotiation will hold up the shutdown process.

- Sockets can stay in non-blocking mode, no need to switch it on/off
  anymore
- Adds a timeout (20 seconds) on SOCK5 negotiation. This should be
  enough for even Tor to get a connection to a hidden service, and
  avoids blocking the opencon thread indefinitely on a hanging proxy.

Fixes #2954.
2014-09-10 11:33:13 +02:00
Wladimir J. van der Laan
4e8cc3cb86
Merge pull request #4867
a95b119 qt: Remove thousands separators after decimal point (Wladimir J. van der Laan)
2014-09-10 10:28:47 +02:00
Pieter Wuille
f7cdcb80ab
Merge pull request #4822
629d75f Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (Pieter Wuille)
2014-09-10 01:44:30 +02:00
Pieter Wuille
4ebd80298d
Merge pull request #4882
faadbe1 remove unneeded cast in rpcmisc.cpp (Philip Kaufmann)
2014-09-10 01:37:46 +02:00
Philip Kaufmann
faadbe1733 remove unneeded cast in rpcmisc.cpp 2014-09-09 19:23:29 +02:00
Pieter Wuille
1575c5171f
Merge pull request #4868
2c2cc5d Remove some unnecessary c_strs() in logging and the GUI (Philip Kaufmann)
f7d0a86 netbase: Use .data() instead of .c_str() on binary string (Wladimir J. van der Laan)
2014-09-09 16:43:06 +02:00
Philip Kaufmann
2c2cc5dac1
Remove some unnecessary c_strs() in logging and the GUI
Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code`
by P. Kaufmann.
2014-09-09 11:31:17 +02:00
Jeff Garzik
540ac4514d Avoid returning many "inv" orphans 2014-09-09 09:26:52 +02:00
Wladimir J. van der Laan
d4168c82be Limit CNode::mapAskFor
Tighten resource constraints on CNode.
2014-09-09 09:19:15 +02:00
Wladimir J. van der Laan
8bc0a0173e
Merge pull request #4873
89d91f6 Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev (Wladimir J. van der Laan)
2014-09-09 09:16:22 +02:00
Pieter Wuille
6022b5dc6b Make script_{valid,invalid}.json validation flags configurable 2014-09-08 22:38:26 +02:00
jtimon
e8b5f0d549 Move CBlockIndex, CChain and related code out of main 2014-09-08 22:17:19 +02:00
jtimon
6db83db3eb Decouple CChain from mapBlockIndex 2014-09-08 22:14:24 +02:00
jtimon
e088d65acb Separate script/sign 2014-09-08 20:21:35 +02:00
jtimon
9294a4bbe7 Separate CScriptCompressor 2014-09-08 20:21:35 +02:00
jtimon
c4408a6c85 Separate script/standard 2014-09-08 20:21:35 +02:00
jtimon
da03e6ed7c Separate script/interpreter 2014-09-08 20:21:33 +02:00
jtimon
cbd22a50c4 Move CScript class and dependencies to script/script 2014-09-08 20:19:31 +02:00
jtimon
86dbeea2cd Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes) 2014-09-08 20:19:31 +02:00
Wladimir J. van der Laan
89d91f6aa7 Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev 2014-09-08 17:38:43 +02:00
Alex Morcos
c26649f9ed Track modified size in TxMemPoolEntry so that we can correctly compute priority. 2014-09-08 11:28:46 -04:00
Pieter Wuille
df623d83da
Merge pull request #4865
8e44f2e Clarify 'compressed nor uncompressed' error message (Peter Todd)
2014-09-08 15:13:55 +02:00
Wladimir J. van der Laan
f7d0a86bf6 netbase: Use .data() instead of .c_str() on binary string
`.c_str()` is only guaranteed to return the data up to the first NUL
character.
2014-09-08 12:20:50 +02:00
Wladimir J. van der Laan
bb4ef1e9dc
Merge pull request #4712
80daee0 [Qt] Call checkBalanceChanged() periodically instead for every updated transaction (Cozz Lovan)
2014-09-08 12:00:08 +02:00
Wladimir J. van der Laan
297998808a
Merge pull request #4697
da2ede2 [Wallet] Improve ReorderTransactions(..) (Cozz Lovan)
2014-09-08 11:07:00 +02:00
Wladimir J. van der Laan
a95b1199db
qt: Remove thousands separators after decimal point
Revert thousands separators after decimal point, as introduced in #4167.
2014-09-08 10:46:52 +02:00
Peter Todd
8e44f2e00a
Clarify 'compressed nor uncompressed' error message 2014-09-07 22:32:57 -04:00
Andreas Schildbach
45a4baf100 Add testnet DNS seed of Andreas Schildbach.
It runs sipas crawler, but rather than using its custom nameserver implementation it serves a generated zonefile via bind9. The zone always contains 25 IPv4 and 25 IPv6 peers. FWIW, the zone is secured using DNSSEC.
2014-09-07 11:16:10 +02:00
ENikS
8d657a6517 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' 2014-09-06 15:59:59 -04:00
Pieter Wuille
93193c8ffd
Merge pull request #4851
41ef558 univalue: make spaceStr thread-safe (Wladimir J. van der Laan)
2014-09-06 21:10:13 +02:00
Wladimir J. van der Laan
6eb427ed6e
Merge pull request #4839
346193b Cleanup messy error messages (R E Broadley)
2014-09-06 11:05:50 +02:00
R E Broadley
346193bd93 Cleanup messy error messages 2014-09-06 14:18:32 +07:00
Pieter Wuille
0c558288cb
Merge pull request #4849
a264e44 remove dup include of foreach.hpp in script.cpp (Philip Kaufmann)
2014-09-05 22:54:03 +02:00
Wladimir J. van der Laan
41ef558aa9
univalue: make spaceStr thread-safe
Simply add spaces to the existing string instead of using a
temporary.

Fixes #4756.
2014-09-05 14:42:22 +02:00
Philip Kaufmann
2605b94d73 [Qt] update form files for setting autoDefault explicitly to false
- also fixes indentation in one file (auto fixed by Qt Designer)
- removes several default parameters, which are not needed in the files
- related to #4840 (but not intended as fix for a no-bug)
2014-09-05 13:54:16 +02:00
Teran McKinney
f79323b0dd
Improve readability of CAddrInfo::IsTerrible
- Replaced 86400 with 24*60*60
- Remove references to specific timespans in comments

Github-Pull: #4724
2014-09-05 13:49:08 +02:00
Philip Kaufmann
1ffb99b07f [Qt] copyright, style and indentation cleanup of Qt tests 2014-09-05 13:23:21 +02:00
Philip Kaufmann
a264e445ff remove dup include of foreach.hpp in script.cpp 2014-09-05 09:49:57 +02:00
Pieter Wuille
af9c3b0cff
Merge pull request #4838
1e4f87f Use memcmp for uint256 equality/inequality (Pieter Wuille)
8a41e1e Use boost::unordered_map for mapBlockIndex (Pieter Wuille)
145d5be Introduce BlockMap type for mapBlockIndex (Pieter Wuille)
a0dbe43 checkpoints.cpp depends on main, it can use mapBlockIndex directly (Pieter Wuille)
2014-09-04 23:49:35 +02:00
Wladimir J. van der Laan
b4cd0975fb
Merge pull request #4783
fbe0fca [Qt] minor watch-only changes (Philip Kaufmann)
2014-09-04 16:44:39 +02:00
Wladimir J. van der Laan
65b529ba93
Merge pull request #4833
bbda402 net: Remove MilliSleep from StopNode (Wladimir J. van der Laan)
2014-09-04 13:31:15 +02:00
Wladimir J. van der Laan
f2cc1ee439
Merge pull request #4790
9189f5f remove useless millisleep (phantomcircuit)
2014-09-04 13:30:34 +02:00
Pieter Wuille
1e4f87f5a1 Use memcmp for uint256 equality/inequality 2014-09-04 02:27:04 +02:00
Pieter Wuille
8a41e1edd4 Use boost::unordered_map for mapBlockIndex 2014-09-04 02:05:20 +02:00
Pieter Wuille
145d5be896 Introduce BlockMap type for mapBlockIndex 2014-09-04 02:04:51 +02:00
Pieter Wuille
a0dbe433bd checkpoints.cpp depends on main, it can use mapBlockIndex directly 2014-09-04 02:01:10 +02:00
Pieter Wuille
961c4a04c2
Merge pull request #4808
3f6540a Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODS (Pieter Wuille)
47eb765 Serializer simplifications after IMPLEMENT_SERIALIZE overhaul (Pieter Wuille)
2014-09-03 21:01:39 +02:00
Pieter Wuille
52c1deb745
Merge pull request #4820
910526d Use OR of respective block flags for masks (Pieter Wuille)
2014-09-03 20:50:57 +02:00
Pieter Wuille
629d75faac Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.
The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist
cache entries, requiring a separate HaveCoins call beforehand. This is
inefficient as both perform a hashtable lookup.

Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL
pointer. This also decreases the overloading of GetCoins.

Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins,
decreasing the copying.
2014-09-03 14:24:52 +02:00
Wladimir J. van der Laan
bbda40226b
net: Remove MilliSleep from StopNode
I don't understand why it would be there in the first place. This looks
like voodoo, not programming.
2014-09-03 12:23:34 +02:00
Matt Corallo
550d4fa7a7 Remove DNS Seeds run by entities which were never well-established. 2014-09-03 00:41:54 -07:00
phantomcircuit
9189f5fe4d remove useless millisleep
reduces time to service requests improving performance
2014-09-02 21:25:53 -07:00
Pieter Wuille
910526d848 Use OR of respective block flags for masks 2014-09-02 18:57:43 +02:00
Pieter Wuille
b8d92236f6
Merge pull request #4812
53efb09 Discover some missing includes (jtimon)
8d5e510 Remove unused function StackString() and class CCoins; (jtimon)
2014-09-02 15:11:55 +02:00
Pieter Wuille
3f6540ad8f Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODS 2014-09-02 09:58:09 +02:00
jtimon
53efb09e4c Discover some missing includes 2014-09-02 02:27:03 +02:00
jtimon
8d5e5102f6 Remove unused function StackString() and class CCoins; 2014-09-02 02:27:03 +02:00
ENikS
c0f5d4aba5 Fixing Compiler Error C2466 2014-09-01 19:51:25 -04:00
Pieter Wuille
47eb76597e Serializer simplifications after IMPLEMENT_SERIALIZE overhaul 2014-09-01 22:00:19 +02:00
Pieter Wuille
2e731f24b5
Merge pull request #4737
31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille)
84881f8 rework overhauled serialization methods to non-static (Kamil Domanski)
5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski)
3d796f8 overhaul serialization code (Kamil Domanski)
2014-09-01 21:23:01 +02:00
Wladimir J. van der Laan
f6a8105037
Merge pull request #4779
093303a add missing header end comments (Philip Kaufmann)
2014-09-01 15:35:09 +02:00
Wladimir J. van der Laan
107922663b
Merge pull request #4767
b144a74 depends: bump miniupnpc to 1.9.20140701. (Cory Fields)
f628127 depends: bump openssl to 1.0.1i (Cory Fields)
9f7f504 build: add -DMINIUPNP_STATICLIB for new version (Cory Fields)
2014-09-01 10:28:33 +02:00
Wladimir J. van der Laan
01113f7b43
Merge pull request #4780
4d04492 add missing copyright headers (Philip Kaufmann)
2014-09-01 10:26:48 +02:00
Wladimir J. van der Laan
6f5d33b3d2
Update translations after update script improvements 2014-09-01 10:10:21 +02:00
Wladimir J. van der Laan
93f97aab62
Merge pull request #4768
2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
2014-09-01 09:42:10 +02:00
Cozz Lovan
d920f7dcf8 Move g_signals.SetBestChain(..) below SyncWithWallets 2014-08-31 16:17:39 +02:00
Pieter Wuille
31e9a8384a Use CSizeComputer to avoid counting sizes in SerializationOp 2014-08-31 02:18:42 +02:00
Kamil Domanski
84881f8c47 rework overhauled serialization methods to non-static
Thanks to Pieter Wuille for most of the work on this commit.
I did not fixup the overhaul commit, because a rebase conflicted
with "remove fields of ser_streamplaceholder".
I prefer not to risk making a mistake while resolving it.
2014-08-31 02:16:17 +02:00
Kamil Domanski
5d96b4ae01 remove fields of ser_streamplaceholder
The nType and nVersion fields of stream objects are never accessed
from outside the class (or perhaps from the inside too, I haven't checked).
Thus no need to have them in a placeholder, whose only purpose is to
fill the "Stream" template parameter in serialization implementation.
2014-08-31 02:16:10 +02:00
Kamil Domanski
3d796f8996 overhaul serialization code
The implementation of each class' serialization/deserialization is no longer
passed within a macro. The implementation now lies within a template of form:

template <typename T, typename Stream, typename Operation>
inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
    size_t nSerSize = 0;
    /* CODE */
    return nSerSize;
}

In cases when codepath should depend on whether or not we are just deserializing
(old fGetSize, fWrite, fRead flags) an additional clause can be used:
bool fRead = boost::is_same<Operation, CSerActionUnserialize>();

The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within
class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize,
Serialize and Unserialize. These are now wrappers around
the "SerializationOp" template.
2014-08-31 02:14:20 +02:00
Daniel Kraft
4b0deb3b2d Clean up CMerkleTx::SetMerkleBranch.
The case SetMerkleBranch(NULL) was never actually used, and thus the
involved code (loading the block from disk) can be removed and the
implementation simplified.
2014-08-30 18:00:55 +02:00
Ross Nicoll
e84843c0db Broken addresses on command line no longer trigger testnet.
When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
2014-08-30 09:39:59 +01:00
Kamil Domanski
9f3d476779
changed field types in some structures to equivalent unambiguous types
Conflicts:
	src/core.cpp

Rebased-By: Wladimir J. van der Laan
Github-Pull: #4180
2014-08-30 06:27:34 +02:00
Wladimir J. van der Laan
ce223e7b7d
Merge pull request #4789
bac5586 Replace weird characters by normal spaces (Pieter Wuille)
2014-08-30 05:58:33 +02:00
Pieter Wuille
f5f1ab8dc3
Merge pull request #4781
187115c cleanup include of assert.h (Philip Kaufmann)
2014-08-30 02:38:36 +02:00
Pieter Wuille
bac5586b10 Replace weird characters by normal spaces 2014-08-30 02:35:05 +02:00
Jeff Garzik
135a43df7b
Merge pull request #4778 2014-08-29 20:22:06 -04:00
jtimon
e9dd83f0a9 missing include boost/algorithm/string/replace.hpp 2014-08-29 22:52:41 +02:00
Jeff Garzik
309aa76d27
Merge pull request #4599 2014-08-29 15:23:13 -04:00
Wladimir J. van der Laan
0101483f46
Move CMerkleTx to wallet.cpp/h
It is only used by the wallet so it has no place in main.
2014-08-29 17:26:01 +02:00
Wladimir J. van der Laan
57153d4e1a rpc: Compute number of confirmations of a block from block height
Currently this uses a CMerkleTx, but that makes no sense as we
have the CBlockIndex available. As noted by @jgarzik.
2014-08-29 17:25:23 +02:00
Wladimir J. van der Laan
faeb341da3
Merge pull request #4777
8bdd287 Fix a few "Uninitialized scalar field" warnings (Wladimir J. van der Laan)
2014-08-29 10:53:47 +02:00
Philip Kaufmann
fbe0fcae76 [Qt] minor watch-only changes
- use watch-only, not watchonly
- add back a tooltip hint when hovering addresses and attach
  "(watch-only)" at the end
2014-08-28 23:20:46 +02:00
Philip Kaufmann
bbad683224 [Qt] simplify return code and return values in txtablemodel
- also move an added space in a string where it belongs
2014-08-28 23:14:11 +02:00
Philip Kaufmann
21f1516468 [Qt] add all used colors in txtablemodel to guiconstants
- add colors used in TX status decoration
2014-08-28 23:14:10 +02:00
Philip Kaufmann
187115c01d cleanup include of assert.h 2014-08-28 23:02:49 +02:00
Philip Kaufmann
4d04492bf2 add missing copyright headers 2014-08-28 22:26:56 +02:00
Philip Kaufmann
093303a887 add missing header end comments
- ensures a consistent usage in header files
- also add a blank line after the copyright header where missing
- also remove orphan new-lines at the end of some files
2014-08-28 22:25:21 +02:00
Wladimir J. van der Laan
3ed668dbe2
Merge pull request #4772
87d9819 fix comments ExtractAddress() -> ExtractDestination() (jtimon)
2014-08-28 18:14:03 +02:00
Wladimir J. van der Laan
8bdd2877c4
Fix a few "Uninitialized scalar field" warnings
Fix a few warnings reported by Coverity.
None of these is critical, but making sure that class fields are
initialized can avoid heisenbugs.
2014-08-28 15:30:50 +02:00
Jeff Garzik
11a899445e
qt/splashscreen: #include version.h
Needed to build breakage reported by Arnavion on IRC:
qt/splashscreen.cpp: In constructor 'SplashScreen::SplashScreen(const QPixmap&, Qt::WindowFlags, bool)':
qt/splashscreen.cpp:33:98: error: 'FormatFullVersion' was not declared in this scope
2014-08-27 22:39:01 -04:00
jtimon
87d9819d4d fix comments ExtractAddress() -> ExtractDestination() 2014-08-28 01:54:45 +02:00
Wladimir J. van der Laan
d2d6f708e4 Fix build with DEBUG_LOCKORDER
Fixes #4771
2014-08-28 01:52:22 +02:00
Pieter Wuille
d1062e32fa
Merge pull request #4377
654871d replace ComputeMinWork with CheckMinWork (jtimon)
b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon)
c2c02f3 Move UpdateTime to pow (jtimon)
2014-08-27 22:39:28 +02:00
Pieter Wuille
cd3d80be67
Merge pull request #4764
92bb6f2 Bypass reloading blocks from disk (Pieter Wuille)
2014-08-27 22:21:33 +02:00
Wladimir J. van der Laan
70352e11c0
Revert "Add a getutxos command to the p2p protocol. It allows querying of the UTXO set"
This reverts commit da2ec100f3.
2014-08-27 18:04:29 +02:00
Wladimir J. van der Laan
2e280311b8
Perform CVerifyDB on pcoinsdbview instead of pcoinsTip
Bypassing the main coins cache allows more thorough checking with the same
memory budget.

This has no effect on performance because everything ends up in the child
cache created by VerifyDB itself.

It has bugged me ever since #4675, which effectively reduced the
number of checked blocks to reduce peak memory usage.

- Pass the coinsview to use as argument to VerifyDB

- This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
  writes a large slew of unchanged coin records back to the database.
2014-08-27 09:20:33 +02:00
Cory Fields
9f7f504efc build: add -DMINIUPNP_STATICLIB for new version
libminiupnpc changed their required static define to the much more sane
"MINIUPNP_STATICLIB". Sadly, they don't respect the old "STATICLIB" for
back-compat. Define them both since the old one didn't seem to be conflicting
anywhere.

Also go ahead and split out the cppflags so that they can be applied only where
they're needed. This will help us to build dll's from our libs without having
their import/export declspecs poisoned.
2014-08-26 15:28:24 -04:00
Cozz Lovan
80daee0fb5 [Qt] Call checkBalanceChanged() periodically instead for every updated transaction 2014-08-26 19:18:33 +02:00
Wladimir J. van der Laan
f30801afbd
qt: Add null check in setClientModel(0)
Don't clear tray icon menu if it was never created.
Necessary precaution after #4649.
2014-08-26 17:59:57 +02:00
Wladimir J. van der Laan
d49b0876a4
Merge pull request #4673
1c5f0af [Qt] Add column Watch-only to transactions list (Cozz Lovan)
939ed97 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged (Cozz Lovan)
2014-08-26 17:41:33 +02:00
Wladimir J. van der Laan
b9bd6282c5
Merge pull request #4649
b197bf3 [Qt] disable tray interactions when client model set to 0 (Philip Kaufmann)
314fbd9 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp (Philip Kaufmann)
8ca6a16 [Qt] ensure all class attributes are init to 0 (Philip Kaufmann)
2014-08-26 17:39:16 +02:00
Pieter Wuille
3da58b216b
Merge pull request #4748
ad49c25 Split up util.cpp/h (Wladimir J. van der Laan)
f841aa2 Move `COIN` and `CENT` to core.h (Wladimir J. van der Laan)
6e5fd00 Move `*Version()` functions to version.h/cpp (Wladimir J. van der Laan)
b4aa769 Move `S_I*` constants and `MSG_NOSIGNAL` to compat.h (Wladimir J. van der Laan)
af8297c Move functions in wallet.h to implementation file (Wladimir J. van der Laan)
651480c move functions in main and net to implementation files (Wladimir J. van der Laan)
610a8c0 Move SetThreadPriority implementation to util.cpp instead of the header (Wladimir J. van der Laan)
f780e65 Remove unused function `ByteReverse` from util.h (Wladimir J. van der Laan)
121d6ad Remove unused `alignup` function from util.h (Wladimir J. van der Laan)
d1e26d4 Move CMedianFilter to timedata.cpp (Wladimir J. van der Laan)
2014-08-26 16:57:05 +02:00
Pieter Wuille
727298cef3
Merge pull request #4763
aa41ac2 Test IsPushOnly() with invalid push (Peter Todd)
2014-08-26 16:50:17 +02:00
Wladimir J. van der Laan
ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Wladimir J. van der Laan
f841aa2892 Move COIN and CENT to core.h
Eventually these should end up in `money.h` after monetary
amounts are typedef'ed, but at least they don't belong in `util.h`.
2014-08-26 13:25:22 +02:00
Wladimir J. van der Laan
6e5fd003e0 Move *Version() functions to version.h/cpp 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
b4aa769bcb Move S_I* constants and MSG_NOSIGNAL to compat.h 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
af8297c010 Move functions in wallet.h to implementation file
Breaks compile-time dependency of wallet.h on util.
2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
651480c8e4 move functions in main and net to implementation files 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
610a8c0759 Move SetThreadPriority implementation to util.cpp instead of the header
Put the THREAD_* and PRIO_ constants in compat.h.
2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
f780e65ac6 Remove unused function ByteReverse from util.h 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
121d6ad9db Remove unused alignup function from util.h 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan
d1e26d4e71 Move CMedianFilter to timedata.cpp
Now that we no longer use the median filter to keep track of
the number of blocks of peers, that's the only place it is used.
2014-08-26 13:25:20 +02:00
Daniel Kraft
d0867acb0e Use const CCoinsView's at some places.
At some places where it is possible (e. g., CheckInputs), use a const
version of CCoinsView instead of a non-const one.
2014-08-26 11:29:18 +02:00
Daniel Kraft
a3dc587a62 Make appropriate getter-routines "const" in CCoinsView.
Mark the "Get"/"Have" routines in CCoinsView and subclasses as "const".
2014-08-26 11:29:18 +02:00
Daniel Kraft
ffb4c210bc Mark LevelDB "Read" and "Exists" functions as const.
Mark the "Read" and "Exists" functions in CLevelDBWrapper as "const".
They do not change anything in the DB, by definition.
2014-08-26 11:26:58 +02:00
Pieter Wuille
92bb6f2f17 Bypass reloading blocks from disk 2014-08-26 02:26:41 +02:00
Wladimir J. van der Laan
49f954f154
Merge pull request #4716
0d27dad Clean-up SyncWithWallets/SyncTransaction (Cozz Lovan)
2014-08-25 15:04:28 +02:00
Wladimir J. van der Laan
26f3a05cf1
Merge pull request #4654
c4a7709 Fixes ignored qt 4.8 codecs path on windows when configuring with --with-qt-libdir (ntrgn)
2014-08-25 13:44:41 +02:00
Wladimir J. van der Laan
11270ebde4
Merge pull request #4351
da2ec10 Add a getutxos command to the p2p protocol. It allows querying of the UTXO set given a set of outpoints. (Mike Hearn)
2014-08-25 10:37:40 +02:00
Peter Todd
aa41ac216e
Test IsPushOnly() with invalid push 2014-08-24 21:16:51 -04:00
Pieter Wuille
fff7455ded Make CScript::clear() release its memory 2014-08-24 02:08:33 +02:00
Pieter Wuille
b0875eb3fe Allow BatchWrite to destroy its input, reducing copying 2014-08-24 02:08:33 +02:00
Pieter Wuille
5cd00bc8cb
Merge pull request #4618
eb0b56b Simplify serialize.h's exception handling (Pieter Wuille)
2014-08-24 02:06:09 +02:00
Jeff Garzik
57fe1eaadc
Merge pull request #4632 2014-08-23 12:59:55 -04:00
jtimon
654871d436 replace ComputeMinWork with CheckMinWork 2014-08-23 13:21:51 +02:00
jtimon
b343c1a1e3 Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) 2014-08-23 13:21:51 +02:00
jtimon
c2c02f3fa9 Move UpdateTime to pow 2014-08-23 13:21:50 +02:00
Wladimir J. van der Laan
92b3d3630d
Merge pull request #4718
88fe88c gui: remove redundant numTransactions tracking (Wladimir J. van der Laan)
2014-08-23 09:30:47 +02:00
Jeff Garzik
fac54dcb71
Merge pull request #4733 2014-08-22 10:35:39 -04:00
Wladimir J. van der Laan
93ed3d9b4e
Merge pull request #4735
3802224 Remove all other print() methods (Wladimir J. van der Laan)
9b6d4c5 Move strprintf define to tinyformat.h (Wladimir J. van der Laan)
8121258 Remove print() from core functions (Wladimir J. van der Laan)
2014-08-21 16:05:47 +02:00
Wladimir J. van der Laan
56953925db
Merge pull request #4706
8695a39 replace int with size_t in stream methods (Kamil Domanski)
2014-08-21 08:51:19 +02:00
Jeff Garzik
9c31174992
Merge pull request #4744 2014-08-20 23:16:21 -04:00
Jeff Garzik
7f836c66bd rpc_tests: use BOOST_CHECK_EQUAL
Upon failure, BOOST_CHECK_EQUAL provides additional diagnostic information,
displaying that data that failed to match.
2014-08-20 22:43:36 -04:00
Wladimir J. van der Laan
3802224110 Remove all other print() methods
All unused.
2014-08-20 20:54:27 +02:00
Wladimir J. van der Laan
9b6d4c5cdc Move strprintf define to tinyformat.h
This avoids a dependency on util.h if just tinyformat is needed.
2014-08-20 10:51:18 +02:00
Wladimir J. van der Laan
81212588c0 Remove print() from core functions
Break dependency on util.
2014-08-20 10:43:47 +02:00
Jeff Garzik
dc271fc025 UniValue tests: use more BOOST_CHECK() 2014-08-20 01:09:21 -04:00
Jeff Garzik
e85267be63 UniValue: add unit tests 2014-08-20 00:28:46 -04:00
Jeff Garzik
dee9324a0b UniValue: compact (!pretty) output should not include extra whitespace 2014-08-20 00:27:49 -04:00
Jeff Garzik
42642c9695 UniValue: use correct setNumStr() input val, when setting number values 2014-08-20 00:27:42 -04:00
Jeff Garzik
df4d61e681 Add bitcoin-tx tests
Testing: delin, delout, locktime, and basic createrawtransaction-like
functionality.
2014-08-19 23:15:58 -04:00
Gavin Andresen
335e3a5c95 Merge pull request #4717 from cozz/cozz8
[Qt] Revert overviewpage from QFormLayout to QVBoxLayout
2014-08-19 13:37:25 -04:00
Gavin Andresen
10dcbc1be0 Merge pull request #4728 from laanwj/2014_08_rpcserver_password_delay
Don't reveal whether password is <20 or >20 characters in RPC
2014-08-19 13:32:40 -04:00
Jeff Garzik
fb14452c6c bitcoin-tx: Accept input via stdin. Add input handling to tests. 2014-08-19 10:29:10 -04:00
Jeff Garzik
d789386371 Add "it works" test for bitcoin-tx 2014-08-19 10:28:58 -04:00
Wladimir J. van der Laan
01094bd01f Don't reveal whether password is <20 or >20 characters in RPC
As discussed on IRC.

It seems bad to base a decision to delay based on the password length,
as it leaks a small amount of information.
2014-08-19 14:40:34 +02:00
Wladimir J. van der Laan
dd2819701a
Merge pull request #4670
a35b55b Dont run full check every time we decrypt wallet. (Matt Corallo)
1e21c17 Make CCryptoKeyStore::Unlock check all keys. (Gregory Maxwell)
2014-08-19 12:23:56 +02:00
Wladimir J. van der Laan
c5a91216ae
Merge pull request #4672
22b3c4b remove unused class CAddrMan; from db.h (Philip Kaufmann)
2014-08-19 11:00:43 +02:00
Wladimir J. van der Laan
691e9d28b5
Merge pull request #4725
e432a5f build: add option for reducing exports (v2) (Cory Fields)
2014-08-19 10:54:35 +02:00
Jeff Garzik
0367329549
Merge branch '2014_univalue_warn' into merge-PR4715
Merge pull request #4715
2014-08-19 00:49:31 -04:00
Jeff Garzik
3a56de7fc3 addrman: Do not propagate obviously poor addresses onto the network 2014-08-18 16:50:39 -04:00
Cory Fields
e432a5f08d build: add option for reducing exports (v2)
This was committed previously as 4975ae172 and reverted, because the flags were
applied even if the checks didn't pass. This is the same commit, fixed up to
actually disable the functionality when necessary.

Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
2014-08-18 16:10:15 -04:00
Kamil Domanski
8695a39350 replace int with size_t in stream methods
Thus the read(...) and write(...) methods of all stream classes now have identical parameter lists.
This will bring these classes one step closer to a common interface.
2014-08-18 20:23:13 +02:00
Wladimir J. van der Laan
a4f151f714
Merge pull request #4704
54c7df8 build: Fix boost build on some platforms (Cory Fields)
2014-08-18 20:17:58 +02:00
Wladimir J. van der Laan
fad23a210b
Revert "build: add option for reducing exports"
Revert #4663 for now. It still breaks the pulltester.

This reverts commit 4975ae1722.

Conflicts:
	configure.ac
2014-08-18 16:52:56 +02:00
Jeff Garzik
3cceba7abb Univalue: Do not build JSON escape list at runtime
No need to waste startup time building something that can be done
at compile time.

This also resolves a clang++ warning originally reported in #4714,
univalue/univalue_write.cpp:33:12: warning: array subscript is of type 'char
escapes['"'] = "\\"";
^~~~

etc.
2014-08-18 10:36:21 -04:00
Wladimir J. van der Laan
e4731dd85c
qt: Use quint64 for formatServicesStr
`uint64_t` was causing a build error on some systems, as that type is
not known after including just the Qt headers.
2014-08-18 16:21:27 +02:00
Wladimir J. van der Laan
04d6c7d10c
Merge pull request #4605
aa82795 Add detailed network info to getnetworkinfo RPC (Wladimir J. van der Laan)
075cf49 Add GetNetworkName function (Wladimir J. van der Laan)
c91a947 Add IsReachable(net) function (Wladimir J. van der Laan)
60dc8e4 Allow -onlynet=onion to be used (Wladimir J. van der Laan)
2014-08-18 13:37:54 +02:00
Wladimir J. van der Laan
aa8279513b
Add detailed network info to getnetworkinfo RPC
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by #2575.
2014-08-18 13:36:10 +02:00
Wladimir J. van der Laan
88fe88cf36
gui: remove redundant numTransactions tracking
This number was still tracked even though it's shown nowhere in the UI
anymore. It was originally removed because it didn't match the actual number of
records in the view (which contains outputs, not transactions) thus was
confusing people.
2014-08-18 10:28:26 +02:00
Wladimir J. van der Laan
21e7a5690f
Merge pull request #4655
216e9a4 Add a way to limit deserialized string lengths (Pieter Wuille)
2014-08-18 09:55:24 +02:00
Cozz Lovan
cb5fa86f42 [Qt] Revert overviewpage from QFormLayout to QVBoxLayout 2014-08-17 23:50:44 +02:00
Cozz Lovan
0d27dad845 Clean-up SyncWithWallets/SyncTransaction 2014-08-17 17:39:30 +02:00
randy-waterhouse
c101c76907 build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes).
Help string consistency tweaks. Target sanity check fix.
2014-08-17 20:22:12 +12:00
Wladimir J. van der Laan
b3ec053082
Merge pull request #4656
5cbda4f Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope. (Ross Nicoll)
2014-08-17 10:18:16 +02:00
Wladimir J. van der Laan
2eb3c85c9a
Merge pull request #4663
4975ae1 build: add option for reducing exports (Cory Fields)
2014-08-17 09:29:59 +02:00
Ross Nicoll
5cbda4f10f Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope.
This corrects a bug where an exception thrown reading from the database causes the cursor to
be left open, which causes an assertion error to occur when the database is deleted (around
line 938 of init.cpp).
2014-08-16 15:27:18 +01:00
randy-waterhouse
a65668ddc0 build : fix CPPFLAGS for libbitcoin_cli 2014-08-16 10:56:28 +12:00
Cory Fields
4975ae1722 build: add option for reducing exports
Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
2014-08-15 17:42:53 -04:00
Cory Fields
54c7df81f3 build: Fix boost build on some platforms
When the libpath doesn't line up with the value from config.sub, we don't find
the correct path to boost's libs. This adds a hack to try another path before
giving up.

Should close #3219.
2014-08-15 12:20:15 -04:00
Wladimir J. van der Laan
984ff68c67
Merge pull request #4638
6f2c26a Closely track mempool byte total. Add "getmempoolinfo" RPC. (Jeff Garzik)
2014-08-15 14:09:33 +02:00
Cory Fields
6b099402b4
build: fix automake warnings about the use of INCLUDES
While we're at it, reduce the use of LIBS as well. This makes dependencies
explicit.

Fixes building with (the not-yet-merged) libsecp256k1 as well.

Github-Pull: #4689
Rebased-By: Wladimir J. van der laan <laanwj@gmail.com>
Rebased-From: 909b347 c0e5dda
2014-08-15 10:42:10 +02:00
Jeff Garzik
6f2c26a457 Closely track mempool byte total. Add "getmempoolinfo" RPC.
Goal:  Gain live insight into the mempool.  Groundwork for future work
that caps mempool size.
2014-08-14 12:34:38 -04:00
Jeff Garzik
c7b6117deb Create new signal for notification of new blocks. Use w/ -blocknotify 2014-08-14 12:32:34 -04:00
Jeff Garzik
beb36e800c ui_interface: remove unused NotifyBlocksChanged signal 2014-08-14 12:19:54 -04:00
Cozz Lovan
da2ede2aa6 [Wallet] Improve ReorderTransactions(..) 2014-08-14 16:19:04 +02:00
Wladimir J. van der Laan
7accb7dbad
Merge pull request #4659
c4bae53 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter (Philip Kaufmann)
2014-08-14 15:52:01 +02:00
Cory Fields
616c24307f bitcoin-tx: fix build warnings
Cleans up a bunch of:
warning: missing braces around initializer for ‘const<anonymous struct>’
2014-08-13 11:57:47 -04:00
Peter Todd
9ee09dc64f
Reapply: Reject transactions with excessive numbers of sigops
Reverting was based on a misunderstanding, it appears.

Github-Pull: #4150
2014-08-13 14:37:56 +02:00
Wladimir J. van der Laan
ce094d83ce
Merge pull request #4682
c33b983 Don't poll showmyip.com, it doesn't exist anymore (Wladimir J. van der Laan)
2014-08-13 12:01:03 +02:00
Wladimir J. van der Laan
c33b983903
Don't poll showmyip.com, it doesn't exist anymore
Fixes #4679.

This leaves us with only one candidate, checkip.dyndns.org.
GetMyExternalIP should be phased out as soon as possible.
2014-08-13 12:00:30 +02:00
Wladimir J. van der Laan
3b72fdfb86 Revert "Reject transactions with excessive numbers of sigops"
This reverts commit 4fad8e6d83.
2014-08-12 15:06:20 +02:00
Wladimir J. van der Laan
8ebe42435a
Merge pull request #4150
4fad8e6 Reject transactions with excessive numbers of sigops (Peter Todd)
2014-08-12 14:57:13 +02:00
Wladimir J. van der Laan
e257b7c4c4
Merge pull request #4675
ea100c7 Reduce maximum coinscache size during verification (Wladimir J. van der Laan)
2014-08-12 14:40:59 +02:00
ntrgn
8bfdc9acaa
qt: better looking trayicon
Github-Pull: #4678
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-12 13:16:01 +02:00
Wladimir J. van der Laan
4c61ba40b9 build: check for sys/prctl.h in the proper way
Use AC_CHECK_HEADERS to check for the header, and include it only
if detected and the subsequent HAVE_SYS_PRCTL_H is set.
2014-08-12 13:04:55 +02:00
Wladimir J. van der Laan
76c49c4138
Fix thread name setting
Because of a typo, thread names no longer appeared in the overview.

This was broken in 51ed9ec.
2014-08-12 12:24:04 +02:00
Wladimir J. van der Laan
a38a98c476
Merge pull request #4603
f0c2915 Simplify and rename CheckWork to ProcessBlockFound (jtimon)
2014-08-12 11:21:10 +02:00
Wladimir J. van der Laan
a63e86e01d
Merge pull request #4680
a381ee5 Remove unnecessary typedef and script.h include (jtimon)
2014-08-12 08:35:33 +02:00
jtimon
a381ee5d1c Remove unnecessary typedef and script.h include 2014-08-12 02:17:29 +02:00
jtimon
54e658f249 Remove unused CKeyStoreIsMineVisitor 2014-08-12 02:02:17 +02:00
Cozz Lovan
1c5f0af0fd [Qt] Add column Watch-only to transactions list 2014-08-11 21:38:36 +02:00
Cozz Lovan
939ed97373 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged 2014-08-11 18:47:02 +02:00
Wladimir J. van der Laan
d17ce77fc1
Merge pull request #4664
565e569 libc-compat: add new symbol that's now needed (Cory Fields)
8021cf8 build: fix FDELT_TYPE configure check (Cory Fields)
2014-08-11 17:32:27 +02:00
Cozz Lovan
6b5b7cbfb4
Categorize rpc help overview
Conflicts:
	src/rpcserver.cpp

Github-Pull: #4539
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: df3d321
2014-08-11 16:20:40 +02:00
Wladimir J. van der Laan
fecab8773d
Merge pull request #4666
ab45ddb Fix typo in gettransaction help (Derek701)
2014-08-11 15:07:24 +02:00
Wladimir J. van der Laan
3e089a00e7
Merge pull request #4668
9297763 [Qt] Add TRY_LOCK back to peertablemodel (Cozz Lovan)
2014-08-11 15:06:43 +02:00
Wladimir J. van der Laan
85af3856e7
Merge pull request #4622
c7f3876 URLs containing a / after the address no longer cause parsing errors. (Ross Nicoll)
2014-08-11 15:06:19 +02:00
Wladimir J. van der Laan
ea96475d23
build: Add mention of --disable-wallet to bdb48 error messages 2014-08-11 14:42:02 +02:00
Mike Hearn
da2ec100f3 Add a getutxos command to the p2p protocol. It allows querying of the UTXO set
given a set of outpoints.
2014-08-11 13:59:47 +02:00
Wladimir J. van der Laan
ea100c73fa Reduce maximum coinscache size during verification
Due to growing coinsviewcaches, the memory usage with checklevel=3
(and standard settings for dbcache) could be up to 500MiB on a
64-bit system. This is about twice the peak during reindexing,
unnecessarily extending bitcoind's memory envelope.

This commit reduces the maximum total size of the caches used during
verification to just nCoinCacheSize, which should be the limit.
2014-08-11 08:43:06 +02:00
Matt Corallo
a35b55b522 Dont run full check every time we decrypt wallet. 2014-08-10 18:36:07 -07:00
Gregory Maxwell
1e21c17d20 Make CCryptoKeyStore::Unlock check all keys.
CCryptoKeyStore::Unlock has a loop to attempt decrypting each key which
 only executes once, likely due to a simple mistake when the code was
 originally written.

This patch fixes the behavior by making it check all keys. It also adds
 a fatal assertion in the case some decrypt but some do not, since that
 indicates that the wallet is in some kind of really bad state.

This may make unlocking noticeably slower on wallets with many keys.
2014-08-10 18:36:06 -07:00
Philip Kaufmann
22b3c4bbbd remove unused class CAddrMan; from db.h 2014-08-10 14:30:30 +02:00
Cozz Lovan
9297763dad [Qt] Add TRY_LOCK back to peertablemodel 2014-08-10 02:28:23 +02:00
Derek701
ab45ddb599 Fix typo in gettransaction help 2014-08-08 23:13:06 -05:00
Pieter Wuille
eb0b56b190 Simplify serialize.h's exception handling
Remove the 'state' and 'exceptmask' from serialize.h's stream implementations,
as well as related methods.

As exceptmask always included 'failbit', and setstate was always called with
bits = failbit, all it did was immediately raise an exception. Get rid of
those variables, and replace the setstate with direct exception throwing
(which also removes some dead code).

As a result, good() is never reached after a failure (there are only 2
calls, one of which is in tests), and can just be replaced by !eof().

fail(), clear(n) and exceptions() are just never called. Delete them.
2014-08-09 01:43:23 +02:00
Pieter Wuille
216e9a4456 Add a way to limit deserialized string lengths
and use it for most strings being serialized.
2014-08-09 01:37:16 +02:00
Cory Fields
565e569772 libc-compat: add new symbol that's now needed 2014-08-08 15:21:50 -04:00
Ross Nicoll
c7f3876d4a URLs containing a / after the address no longer cause parsing errors. 2014-08-08 19:10:35 +01:00
Philip Kaufmann
b197bf3270 [Qt] disable tray interactions when client model set to 0
- this prevents the ability to fiddle around with the system tray when
  already shutting down (e.g. on slow shutdowns because of a proxy delay)
- extends solution for #4360
2014-08-08 12:13:39 +02:00
Philip Kaufmann
314fbd9ac7 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp 2014-08-08 12:13:27 +02:00
Philip Kaufmann
8ca6a16176 [Qt] ensure all class attributes are init to 0
- in BitcoinGUI and UnitDisplayStatusBarControl
2014-08-08 12:13:26 +02:00
Wladimir J. van der Laan
f5d99075bf
Merge pull request #4635
6c23b08 CCoinsKeyHasher::operator() should return size_t (Wladimir J. van der Laan)
2014-08-08 11:28:21 +02:00
Philip Kaufmann
c4bae53092 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter
- doesn't belong to the ToolTipToRichTextFilter class so move it up
2014-08-08 11:04:35 +02:00
Philip Kaufmann
94e1b9e05b [Qt] re-work overviewpage UI
- ensure normal and watch-only stuff looks consistent
- simplify UI by removing unneeded UI layout elements
- change some comments to watch-only from watchonly
2014-08-08 09:58:58 +02:00
Wladimir J. van der Laan
3181986d7e
Merge pull request #4636
efd6b87 small net cleanup (Philip Kaufmann)
2014-08-08 09:30:19 +02:00
Philip Kaufmann
efd6b87811 small net cleanup
- add comment for disabling sigpipe
- add closing comment in compat.h
- remove redundant check in net.h
2014-08-08 07:40:45 +02:00
ntrgn
c4a77090c4 Fixes ignored qt 4.8 codecs path on windows when configuring with --with-qt-libdir 2014-08-07 20:02:35 +02:00
Cory Fields
292cc072f3 qt: fix unicode character display on osx when building with 10.7 sdk 2014-08-07 12:34:53 -04:00
Wladimir J. van der Laan
003bbd5f76
Merge pull request #4645
6b271a3 build: fix race in 'make deploy' for windows (Cory Fields)
d343460 build: Fix 'make deploy' when binaries haven't been built yet (Cory Fields)
206a7f9 build: hook up qt translations for static osx packaging (Cory Fields)
d597219 build: add --with-qt-translationdir to configure for use with static qt (Cory Fields)
71941ce build: teach macdeploy the -translations-dir argument, for use with static qt (Cory Fields)
f8120f7 build: Find the proper xcb/pcre dependencies (Cory Fields)
eccd585 build: silence mingw fpic warning spew (Cory Fields)
a98356f build: don't let libtool insert rpath into binaries (Cory Fields)
2014-08-07 12:48:19 +02:00
Wladimir J. van der Laan
0b588168ab
Merge pull request #4640
733177e Remove size limit in RPC client, keep it in server (Wladimir J. van der Laan)
e17151a Avoid a copy in RPC output (Wladimir J. van der Laan)
2014-08-07 10:50:37 +02:00
Wladimir J. van der Laan
6c23b08203
CCoinsKeyHasher::operator() should return size_t
It currently returns uint64_t, which on older boost (at least 1.46) causes
test failures on 32-bit systems.

This problem was introduced in bc42503.

Fixes #4634.
2014-08-07 09:28:37 +02:00
Cory Fields
d597219d6d build: add --with-qt-translationdir to configure for use with static qt 2014-08-06 19:29:19 -04:00
Cory Fields
f8120f7e0f build: Find the proper xcb/pcre dependencies 2014-08-06 19:29:18 -04:00
Wladimir J. van der Laan
8833acc4c9
Merge pull request #4498
2887bff Update coding style and add .clang-format (Pieter Wuille)
2014-08-06 17:17:32 +02:00
Wladimir J. van der Laan
e05d72055a
qt: bitcoin_en update after 8d0d512 2014-08-06 16:12:37 +02:00
Wladimir J. van der Laan
607758db93
Merge pull request #4631
a409467 more Bitcoin -> Bitcoin Core string changes (Philip Kaufmann)
2014-08-06 16:10:19 +02:00
Wladimir J. van der Laan
5f1b76aaf0
Merge pull request #4615
283a3b8 small ordering cleanup of init help message (Philip Kaufmann)
2014-08-06 16:00:39 +02:00
Wladimir J. van der Laan
9db9257ac4
Merge pull request #4629
ead6737 [Qt] format ping times in peers tab as ms (Philip Kaufmann)
2014-08-06 15:48:01 +02:00
Wladimir J. van der Laan
733177ebd3 Remove size limit in RPC client, keep it in server
The size limit makes a lot of sense for the server, as it never has to
accept very large data.

The client, however, can request arbitrary amounts of data with
`listtransactions` on a large wallet.

Fixes #4604.
2014-08-06 13:03:58 +02:00
Wladimir J. van der Laan
e17151ad2a Avoid a copy in RPC output
Split up HTTPReply into HTTPReply and HTTPReplyHeader, so that
the message data can be streamed directly.

Also removes a c_str(), which would have prevented binary
output with NUL characters in it.
2014-08-06 13:01:49 +02:00
ntrgn
9ce0774aba
build: Fix windows configure when using --with-qt-libdir
fixes #4630

Github-Pull: #4633
2014-08-05 15:01:33 +02:00
Philip Kaufmann
a409467e14 more Bitcoin -> Bitcoin Core string changes 2014-08-04 21:09:38 +02:00
Philip Kaufmann
ead6737b87 [Qt] format ping times in peers tab as ms
- also align ping times to the right
2014-08-04 19:23:57 +02:00
Wladimir J. van der Laan
8d0d512bde
Merge pull request #4606
bd0aa10 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. (Doug)
2014-08-04 17:16:12 +02:00
Jeff Garzik
70b9d36a2c
Log "version" message IP addresses in client connect summary
The only other method of logging remote addresses is via

     -logips=1 -debug=net

which increases the logged activity by 100x or more.

Github-Pull: #4608
Amended-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-04 16:59:28 +02:00
Wladimir J. van der Laan
2497209b77
Merge pull request #4598
e59441f Process fee estimate file into temporary vector first to let sanity checking complete. (Alex Morcos)
961ae93 Fix minor bug which only affected log messages. (Alex Morcos)
17f1567 Fixed a bug with index bounds checking (Alex Morcos)
2014-08-04 16:45:29 +02:00
Wladimir J. van der Laan
488a616439
qt: Demote ReportInvalidCertificate message to qDebug
Too spammy.
2014-08-04 16:41:42 +02:00
Philip Kaufmann
a5b2d9c82e [Qt] tweak new peers tab in console window
- remove starting height as table header and replace with ping time
- remove columnResizingFixer
- add local address (if available) in detailed node view (on top of the
  right view below the remote address)
- remove some .c_str() by using QString::fromStdString()
- rename Address to Address/Hostname
- rename secs to just s for ping time
- use MODEL_UPDATE_DELAY from guiconstants.h for the peer refresh time
- make PeerTableModel::columnCount() return no hard-coded value
- remove and cleanup dup private: section in RPCConsole header
- add new defaults for column sizes
- remove behaviour which keeps disconnected peers selected and also remove
  code which keeps track of last selected peer stats
- add sync height to detail view
- add some additional NULL pointer checks for clientModel in
  rpcconsole.cpp
2014-08-04 15:46:18 +02:00
Wladimir J. van der Laan
d97a58f883
Merge pull request #4582
a60120e Add built-in seeds for .onion (Wladimir J. van der Laan)
2014-08-04 12:15:10 +02:00
pryds
2b410c2fe1 Typo, and a few "Bitcoin" -> "Bitcoin Core"
Github-Pull: #4619
2014-08-04 10:30:59 +02:00
Daniel Kraft
b33bd7a3be Implement "getchaintips" RPC command to monitor blockchain forks.
Port over https://github.com/chronokings/huntercoin/pull/19 from
Huntercoin:  This implements a new RPC command "getchaintips" that can be
used to find all currently active chain heads.  This is similar to the
-printblocktree startup option, but it can be used without restarting
just via the RPC interface on a running daemon.
2014-08-03 18:12:19 +02:00
Wladimir J. van der Laan
a60120e951 Add built-in seeds for .onion
This makes it possible for a node with `-onlynet=tor` to bootstrap
itself.

It also adds the base infrastructure for adding IPv6 seed nodes.

Also represent IPv4 fixed seed addresses in 16-byte format.
2014-08-03 17:26:27 +02:00
Wladimir J. van der Laan
6278bd57c6
Merge pull request #4602
6fd59ee script.h: set_vch() should shift a >32 bit value (Jeff Garzik)
2014-08-03 17:09:23 +02:00
Wladimir J. van der Laan
b4c61f878c
Merge pull request #4610
bdba2dd qt: Remove an obscure option no-one cares about (Wladimir J. van der Laan)
2014-08-03 17:08:57 +02:00
Jeff Garzik
1045452fa5
Merge branch 'whyextern' of git://github.com/jtimon/bitcoin into merge-whyextern 2014-08-01 22:45:58 -04:00
jtimon
f5745fa52a Declare SignatureHash() in script.h 2014-08-01 17:45:09 +02:00
Jeff Garzik
de89257fc5
Merge branch 'merge-rawtx2' into merge-rawtx3 2014-08-01 06:18:58 -04:00
Philip Kaufmann
2b600992e8 add license header to core_io.h, core_read/_write.cpp 2014-08-01 08:39:06 +02:00
Philip Kaufmann
1b73d36b2c fix compilation error in core_io.h
- error: 'vector' in namespace 'std' does not name a type
- add <vector> include in core_io.h
- remove <vector> includes from core_read.cpp and core_write.cpp
2014-08-01 08:38:23 +02:00
Philip Kaufmann
283a3b88b6 small ordering cleanup of init help message 2014-08-01 08:04:46 +02:00
Wladimir J. van der Laan
9fcb410195
qt: Remove '0 BTC' placeholder from translation 2014-08-01 07:51:24 +02:00
Wladimir J. van der Laan
c0e9548b63
qt: more watchonly -> watch-only 2014-07-31 17:19:05 +02:00
Wladimir J. van der Laan
bd26fee10b
qt: Update some messages after suggestions by translators
- *cannot* is more common, thus preferred to *can not*
- Use *Watch-only* instead of *Watchonly* as one word
2014-07-31 16:58:23 +02:00
Wladimir J. van der Laan
84c5f77deb
English translation update
This is needed to add version 0.10.x on Transifex so that translation
can start.
2014-07-31 15:03:03 +02:00
Wladimir J. van der Laan
b7bba43a14
Merge pull request #4560
d2d9dc0 script tests: add tests for CHECKMULTISIG limits (Otto Allmendinger)
89101c6 script test: test case for 5-byte bools (Otto Allmendinger)
4cac5db script tests: value with trailing 0x00 is true (Otto Allmendinger)
833ff16 script tests: values that overflow to 0 are true (Otto Allmendinger)
0072d98 script tests: BOOLAND, BOOLOR decode to integer (Otto Allmendinger)
ed02282 additional test for OP_SIZE in script_valid.json (Otto Allmendinger)
2014-07-31 09:42:00 +02:00
Wladimir J. van der Laan
2870014f3a
Merge pull request #4568
9c34731 CBloomFilter::clear() method (Tom Harding)
2014-07-31 09:25:20 +02:00
Wladimir J. van der Laan
bdba2dd000
qt: Remove an obscure option no-one cares about
Remove the "Display addresses" setting checkbox. It doesn't do what
the tooltip says, and seems kind of pointless in any case.

Fixes #4580.
2014-07-31 09:10:58 +02:00
Jeff Garzik
c7614f16d6
univalue: remove unused methods getArray, getObject 2014-07-30 23:25:30 -04:00
Jeff Garzik
a715a643bc
Merge branch 'rawtx' into merge-rawtx 2014-07-30 23:17:19 -04:00
Pieter Wuille
e8cb5c30b0
Merge pull request #4497
714a3e6 Only keep setBlockIndexValid entries that are possible improvements (Pieter Wuille)
2014-07-31 00:07:47 +02:00
Doug
bd0aa10519 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. 2014-07-30 16:04:40 -04:00
Wladimir J. van der Laan
075cf49e59 Add GetNetworkName function
Returns the network name for an Network enum.
2014-07-30 15:41:17 +02:00
Wladimir J. van der Laan
c91a9471be Add IsReachable(net) function
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).
2014-07-30 15:41:17 +02:00
Wladimir J. van der Laan
60dc8e4208 Allow -onlynet=onion to be used
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.
2014-07-30 15:38:58 +02:00
Wladimir J. van der Laan
efec4ec6c5
Merge pull request #4593
d70bc52 Rework block processing benchmark code (Pieter Wuille)
2014-07-30 11:06:33 +02:00
jtimon
f0c2915f66 Simplify and rename CheckWork to ProcessBlockFound 2014-07-30 02:26:21 +02:00
Alex Morcos
e59441f086 Process fee estimate file into temporary vector first to let sanity checking complete. 2014-07-29 13:58:08 -04:00
Jeff Garzik
6fd59ee897 script.h: set_vch() should shift a >32 bit value
Source: http://www.viva64.com/en/b/0268/
2014-07-29 11:24:26 -04:00
Jeff Garzik
cbe39a3852 Add "bitcoin-tx" command line utility and supporting modules.
This is a simple utility that provides command line manipulation of
a hex-encoded TX. The utility takes a hex string on the command line
as input, performs zero or more mutations, and outputs a hex string
to standard output.

This utility is also an intentional exercise of the "bitcoin library"
concept. It is designed to require minimal libraries, and works
entirely without need for any RPC or P2P communication.

See "bitcoin-tx --help" for command and options summary.
2014-07-29 11:13:27 -04:00
Jeff Garzik
3ce7e669e3 bitcoin-cli, rpcrawtransaction: harmonize "{" styling 2014-07-29 11:13:27 -04:00
Cory Fields
2a5840096f core_read's ParseScript(): minor cleanups
- use .empty() rather than .size() == 0
- use a const_iterator rather than BOOST_FOREACH
- validate iterators before creating a string from them
2014-07-29 11:13:27 -04:00
Jeff Garzik
b2aeaa7939 Move ParseScript() helper, becoming accessible outside src/test/ 2014-07-29 11:13:27 -04:00