Commit graph

5333 commits

Author SHA1 Message Date
Wladimir J. van der Laan
ac0b2393a4
Merge pull request #5351
3d0a1ce Process help and version arguments before datadir. (Pavel Janík)
2014-11-25 14:44:30 +01:00
Pieter Wuille
da918ac06e Make SCRIPT_VERIFY_CLEANSTACK a standardness requirement 2014-11-25 12:38:01 +01:00
Pieter Wuille
b6e03cc592 Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6)
Based on an earlier patch by Peter Todd, though the rules here are different
(P2SH scripts should not have a CLEANSTACK check before the P2SH evaluation).
2014-11-25 12:38:01 +01:00
Pieter Wuille
ae4151bbad No semantic change: reuse stack variable in P2SH evaluation 2014-11-25 12:35:32 +01:00
Pieter Wuille
3dd8ed72e5 Delay writing block indexes in invalidate/reconsider 2014-11-25 12:33:43 +01:00
Pieter Wuille
798faec3ea Add 'invalidateblock' and 'reconsiderblock' RPC commands.
These can be used for testing reorganizations or for manual intervention in case of
chain forks.
2014-11-25 12:32:51 +01:00
Wladimir J. van der Laan
397b9011c9
Merge pull request #5241
a206950 Introduce separate flushing modes (Pieter Wuille)
51ce901 Improve chainstate/blockindex disk writing policy (Pieter Wuille)
2014-11-25 12:18:00 +01:00
Pavel Janík
3a05ba1bfc Fix typo in doxygen comment. 2014-11-25 08:18:33 +01:00
Cory Fields
322317951f libbitcoinconsensus: don't require any global constructors
These static objects are only used in once place, so declare them there instead.
2014-11-24 15:23:29 -05:00
Wladimir J. van der Laan
6f9e67aca7
Merge pull request #5358
3c77714 Make -proxy set all network types, avoiding a connect leak. (Gregory Maxwell)
2014-11-24 15:30:31 +01:00
Wladimir J. van der Laan
1ee685f984
Merge pull request #5154
730b1ed Check pindexBestForkBase for null (21E14)
2014-11-24 15:29:52 +01:00
Jonas Schnelli
c5a2282855
[Qt, OSX] fix Qt4.8 compatibility with QProgressBar issue
Rebased-From: 7f33d2cebfde99ded12c711ef6bd77c91725cfb8
Github-Issue: #5344
2014-11-24 15:26:58 +01:00
Pieter Wuille
a206950016 Introduce separate flushing modes 2014-11-24 15:15:41 +01:00
Pieter Wuille
51ce901aa3 Improve chainstate/blockindex disk writing policy
There are 3 pieces of data that are maintained on disk. The actual block
and undo data, the block index (which can refer to positions on disk),
and the chainstate (which refers to the best block hash).

Earlier, there was no guarantee that blocks were written to disk before
block index entries referring to them were written. This commit introduces
dirty flags for block index data, and delays writing entries until the actual
block data is flushed.

With this stricter ordering in writes, it is now safe to not always flush
after every block, so there is no need for the IsInitialBlockDownload()
check there - instead we just write whenever enough time has passed or
the cache size grows too large. Also updating the wallet's best known block
is delayed until this is done, otherwise the wallet may end up referring to an
unknown block.

In addition, only do a write inside the block processing loop if necessary
(because of cache size exceeded). Otherwise, move the writing to a point
after processing is done, after relaying.
2014-11-24 15:15:40 +01:00
Wladimir J. van der Laan
f24bcce2ac
Merge pull request #1816
b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr)
60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr)
bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr)
9765a50 Implement BIP 23 Block Proposal (Luke Dashjr)
3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr)
132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr)
df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr)
4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr)
a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
2014-11-24 14:43:10 +01:00
Wladimir J. van der Laan
6582f323f0
Merge pull request #5224
f321d6b Add key generation/verification to ECC sanity check (Pieter Wuille)
d0c41a7 Add sanity check after key generation (Pieter Wuille)
2014-11-24 14:39:25 +01:00
Wladimir J. van der Laan
dfc8e1432a
Merge pull request #5309
4574248 [Qt] minor ordering cleanup after new fee selection (Philip Kaufmann)
a01fa30 minor style cleanup after HTTP rest interface merge (Philip Kaufmann)
2014-11-24 14:35:50 +01:00
Pavel Janík
494f6e7d35 Check for strnlen and provide it if it is not found. 2014-11-24 10:28:24 +01:00
Gregory Maxwell
3c77714134 Make -proxy set all network types, avoiding a connect leak.
Previously -proxy was not setting the proxy for IsLimited networks, so
 if you set your configuration to be onlynet=tor you wouldn't get an
 IPv4 proxy set.

The payment protocol gets its proxy configuration from the IPv4 proxy,
 and so it would experience a connection leak.

This addresses issue #5355 and also clears up a cosmetic bug where
 getinfo proxy output shows nothing when onlynet=tor is set.
2014-11-23 15:17:11 -08:00
dexX7
7357893396
Prioritize and display -testsafemode status in UI
Like in a real world situation, a safe mode test should also be visible in the
UI. A test of safe mode is furthermore mostly relevant for developers, so it
should not be overwritten by a warning about a pre-release test build.
2014-11-23 13:10:31 +01:00
Pieter Wuille
f321d6bfff Add key generation/verification to ECC sanity check 2014-11-23 10:47:39 +01:00
Pieter Wuille
d0c41a7350 Add sanity check after key generation
Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
2014-11-23 10:47:39 +01:00
Pavel Janík
e0535e15ab Remove misleading comment about testnet's message string. 2014-11-22 22:22:12 +01:00
Pavel Janík
3d0a1ce193 Process help and version arguments before datadir. 2014-11-22 20:46:11 +01:00
21E14
730b1ed1a0 Check pindexBestForkBase for null 2014-11-22 00:12:41 -05:00
Philip Kaufmann
1b2600a13a
Change MIT/X11 to MIT in license displayed in the program 2014-11-21 17:03:59 +01:00
Michael Ford
fa94b9d562
Convert remaining comments in /src to doxygen format
- Update comments in checkpoints to be doxygen compatible
- Update comments in checkqueue to be doxygen compatible
- Update coins to be doxygen compatible
- Fix comment typo in crypter.h
- Update licenses/copyright dates

Closes #5325 #5184 #5183 #5182
2014-11-21 14:44:21 +01:00
Wladimir J. van der Laan
f2ada138c2
Merge pull request #5170
092b58d CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex) (jtimon)
22c4272 MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h) (jtimon)
2014-11-21 14:33:22 +01:00
Wladimir J. van der Laan
ca6fb4e885
Merge pull request #5247
ca81587 Test the exact order of CHECKMULTISIG sig/pubkey evaluation (Peter Todd)
98b135f Make STRICTENC invalid pubkeys fail the script rather than the opcode. (Pieter Wuille)
2014-11-21 14:21:56 +01:00
Wladimir J. van der Laan
cb83af9937
Merge pull request #5318
77c38bb Truthier error message when rpcpassword is missing (Glenn Willen)
2014-11-21 13:53:57 +01:00
Wladimir J. van der Laan
4a106eeb33
qt: English translation update 2014-11-21 10:24:30 +01:00
Wladimir J. van der Laan
db5308f447
Merge pull request #5322
aabe61c [Qt] explicitly call proxy in GUI settings SOCKS5 proxy (Philip Kaufmann)
2014-11-21 10:21:56 +01:00
Cory Fields
f618577029 build: fix link error on some platforms. Fixes #5235
Some users may have libtool libs (.la) installed in their linker search paths.
In this case, using -static-libtool-libs would try to link in .a's instead of
shared libs. That would be harmless unless the .a was built in a way that
would break linking, like non-fpic.

What we really want is "-static" here. Despite its name, it's actually less
aggressive than -static-libtool-libs. It causes only internal libs to be linked
statically (libbitcoinconsensus is the one were'a after).
2014-11-20 13:45:14 -05:00
Pieter Wuille
9d8604f36a Header define style cleanups 2014-11-20 17:22:06 +01:00
Pieter Wuille
a53fd41485 Deterministic signing 2014-11-20 17:22:06 +01:00
Pieter Wuille
3060e36098 Add the RFC6979 PRNG 2014-11-20 17:22:06 +01:00
Pieter Wuille
a8f5087e53 Add HMAC-SHA256 2014-11-20 17:22:06 +01:00
Pieter Wuille
36fa4a78ac Split up crypto/sha2 2014-11-20 17:22:02 +01:00
Luke Dashjr
b867e409e5 CreateNewBlock: Stick height in coinbase so we pass template sanity check 2014-11-20 15:32:49 +00:00
Wladimir J. van der Laan
5c4dffd188
Merge pull request #5270
57425a2 Check block header before accepting it. (Daniel Kraft)
2014-11-20 15:41:58 +01:00
Peter Todd
ca8158719b Test the exact order of CHECKMULTISIG sig/pubkey evaluation
Possible with STRICTENC
2014-11-20 15:29:28 +01:00
Pieter Wuille
98b135f97f Make STRICTENC invalid pubkeys fail the script rather than the opcode.
This turns STRICTENC turn into a softforking-safe change (even though it
is not intended as a consensus rule), and as a result guarantee that using
it for mempool validation only results in consensus-valid transactions in
the mempool.
2014-11-20 15:29:26 +01:00
Pieter Wuille
3ba5ebc065
Merge pull request #5000
0391423 Discourage NOPs reserved for soft-fork upgrades (Peter Todd)
2014-11-20 15:27:39 +01:00
Wladimir J. van der Laan
cf9c4887f1
Merge pull request #5324
72fb3d2 Update comments in src/rpc* to be doxygen compatible (Michael Ford)
2014-11-20 14:40:42 +01:00
Wladimir J. van der Laan
5c6b384502
Merge pull request #5320
e0a25c5 qt: Make askpassphrase dialog behave more sanely (Wladimir J. van der Laan)
2014-11-20 13:48:38 +01:00
Philip Kaufmann
aabe61cb37 [Qt] explicitly call proxy in GUI settings SOCKS5 proxy
- to ensure a consistent wording between core and GUI
2014-11-20 12:45:38 +01:00
Pieter Wuille
34559c7c73 Make PruneBlockIndexCandidates safer 2014-11-20 12:43:50 +01:00
Philip Kaufmann
4574248f9f [Qt] minor ordering cleanup after new fee selection 2014-11-20 12:29:52 +01:00
Philip Kaufmann
a01fa3035f minor style cleanup after HTTP rest interface merge
- no code changes
2014-11-20 12:29:19 +01:00
Wladimir J. van der Laan
e0a25c54eb qt: Make askpassphrase dialog behave more sanely
Set minimum sizes appropriately, and make sure that they
are enforced. Replaces #5226.
2014-11-20 12:28:34 +01:00
Daniel Kraft
57425a2425 Check block header before accepting it.
Previously, AcceptBlockHeader did not check the header (in particular
PoW).  This made the client accept invalid-PoW-headers from peers in
headers-first sync.
2014-11-20 08:28:19 +01:00
Cory Fields
269efa30ed build: add quick consensus lib tests
They should be hooked up in other places as well, but this is a start.
2014-11-19 22:31:10 -05:00
Cory Fields
cdd36c6c5c build: add --with-libs so that libs are optional 2014-11-19 22:31:10 -05:00
Cory Fields
2cf5f16c25 build: add libbitcoinconsensus files and hook up the lib build
Credit BlueMatt for libbitcoinsonsensus.h/cpp
2014-11-19 22:31:10 -05:00
Cory Fields
e0077de5de build: make a distinction between static app ldflags and static lib ldflags
For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
2014-11-19 22:08:27 -05:00
Michael Ford
72fb3d295a Update comments in src/rpc* to be doxygen compatible 2014-11-20 10:19:39 +08:00
Luke Dashjr
60755dbf76 submitblock: Check for duplicate submissions explicitly 2014-11-20 00:15:17 +00:00
Luke Dashjr
9765a50cbd Implement BIP 23 Block Proposal 2014-11-20 00:15:16 +00:00
Glenn Willen
77c38bb5cc Truthier error message when rpcpassword is missing 2014-11-19 15:34:36 -08:00
Cozz Lovan
c1c9d5b415 [Qt] Add Smartfee to GUI 2014-11-19 16:04:53 +01:00
Cozz Lovan
e7876b2979 [Wallet] Prevent user from paying a non-sense fee 2014-11-19 16:04:53 +01:00
Cozz Lovan
ed3e5e468c [Wallet] Add global boolean whether to pay at least the custom fee (default=true) 2014-11-19 16:04:53 +01:00
Cozz Lovan
0ed9675be4 [Wallet] Add global boolean whether to send free transactions (default=true) 2014-11-19 16:04:53 +01:00
Wladimir J. van der Laan
18832ff8e1
Merge pull request #5313
230f7a8 Remove unused ecwrapper code (Pieter Wuille)
2014-11-19 15:24:01 +01:00
Wladimir J. van der Laan
e587ecd8a6
Merge pull request #5296
0ceab00 [Qt, OSX] move QProgressBarMac to guiutil.h (Jonas Schnelli)
6093aa1 [Qt, OSX] QProgressBar CPU-Issue workaround (Jonas Schnelli)
2014-11-19 14:58:39 +01:00
Jonas Schnelli
0ceab00d16 [Qt, OSX] move QProgressBarMac to guiutil.h 2014-11-19 14:08:56 +01:00
Pieter Wuille
230f7a833d Remove unused ecwrapper code 2014-11-19 12:29:41 +01:00
Wladimir J. van der Laan
271061242b
Merge pull request #5220
f9e40fb revert part of 9eda1620b (Cory Fields)
4300876 build: secp256k1 as a subdir, since it's required (Cory Fields)
0dc8613 build: fixup configure to not export anything (Cory Fields)
54566de depends: quit exporting in config.site (Cory Fields)
ff1e5ba depends: add gmp package (Cory Fields)
cf61b54 Don't use bashisms in configure (Pieter Wuille)
dffb8f8 Use libsecp256k1 in key.cpp (Pieter Wuille)
4c97c64 Do not use EC code in global constructors (Pieter Wuille)
07a9901 Always build and link libsecp256k1 (Pieter Wuille)
d48555b Squashed 'src/secp256k1/' content from commit ad2028f (Pieter Wuille)
7a7e109 Delete src/secp256k1 before subtree import (Pieter Wuille)
2014-11-19 12:02:29 +01:00
Wladimir J. van der Laan
5716808ca7
Merge pull request #5300
a7f2941 [Qt, OSX] fix usage of osx 10.8+ user notification center (Jonas Schnelli)
2014-11-19 10:51:59 +01:00
HarryWu
60d1ecd378 change nSubsidy's type from int64_t to CAmount 2014-11-19 14:01:18 +08:00
Gavin Andresen
fd3777b0b2
Merge pull request #5280
3c30f27 travis: disable rpc tests for windows until they're not so flaky (Cory Fields)
daf03e7 RPC tests: create initial chain with specific timestamps (Gavin Andresen)
a8b2ce5 regression test only setmocktime RPC call (Gavin Andresen)
2014-11-18 14:31:29 -05:00
Luke Dashjr
3dcbb9b6b4 Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock 2014-11-18 19:20:10 +00:00
Luke Dashjr
132ea9b48f miner_tests: Disable checkpoints so they don't fail the subsidy-change test 2014-11-18 19:20:10 +00:00
Luke Dashjr
df08a626e0 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) 2014-11-18 19:20:10 +00:00
Luke Dashjr
4ea1be7fb8 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock 2014-11-18 19:20:10 +00:00
Luke Dashjr
a48f2d6ddd Abstract context-dependent block checking from acceptance 2014-11-18 19:20:10 +00:00
Cory Fields
4300876c81 build: secp256k1 as a subdir, since it's required 2014-11-18 18:06:47 +01:00
Pieter Wuille
dffb8f81b8 Use libsecp256k1 in key.cpp 2014-11-18 18:06:46 +01:00
Pieter Wuille
4c97c64bf6 Do not use EC code in global constructors 2014-11-18 18:06:46 +01:00
Pieter Wuille
07a9901703 Always build and link libsecp256k1 2014-11-18 18:06:46 +01:00
Pieter Wuille
d48555b36a Squashed 'src/secp256k1/' content from commit ad2028f
git-subtree-dir: src/secp256k1
git-subtree-split: ad2028f9890ca40bdd32055aa0fe5c1c9af0e485
2014-11-18 18:06:36 +01:00
Pieter Wuille
2245a95ce8 Merge commit 'd48555b36ac512161b81f9b6bca7bea16a0cd806' as 'src/secp256k1' 2014-11-18 18:06:36 +01:00
Pieter Wuille
7a7e109139 Delete src/secp256k1 before subtree import 2014-11-18 18:06:36 +01:00
Pieter Wuille
e2f30d547f Properly lock cs_main in rest_block 2014-11-18 16:32:48 +01:00
Jeff Garzik
7715c84747
HTTP REST: minor fixes
1) const-ify internal helper ParseHashStr()

2) use HTTPError() helper when returning HTTP_NOT_FOUND
2014-11-18 10:27:45 -05:00
Jeff Garzik
9445b876bd
Merge pull request #2844 2014-11-18 10:17:22 -05:00
Wladimir J. van der Laan
27b2288f33
Merge pull request #5290
5d60b69 Coin Control: Make list mode default (Luke Dashjr)
4ff81d6 Bugfix: Clarify coin control dialog labels (Luke Dashjr)
2014-11-18 14:41:02 +01:00
Jonas Schnelli
a7f2941068 [Qt, OSX] fix usage of osx 10.8+ user notification center
Currently Bitcoin-Qts support for OSX User Notification Center is broken. This pull will fix a known issue of non-official-apple-built apps having problems sending user notifications.
2014-11-18 13:50:25 +01:00
Peter Todd
03914234b3
Discourage NOPs reserved for soft-fork upgrades
NOP1 to NOP10 are reserved for future soft-fork upgrades. In the event
of an upgrade such NOPs have *VERIFY behavior, meaning that if their
arguments are not correct the script fails. Discouraging these NOPs by
rejecting transactions containing them from the mempool ensures that
we'll never accept transactions, nor mine blocks, with scripts that are
now invalid according to the majority of hashing power even if we're not
yet upgraded. Previously this wasn't an issue as the IsStandard() rules
didn't allow upgradable NOPs anyway, but 7f3b4e95 relaxed the
IsStandard() rules for P2SH redemptions allowing any redeemScript to be
spent.

We *do* allow upgradable NOPs in scripts so long as they are not
executed. This is harmless as there is no opportunity for the script to
be invalid post-upgrade.
2014-11-17 22:22:33 -05:00
Wladimir J. van der Laan
8adf457047
Merge pull request #5212
219a147 script: check ScriptError values in script tests (Cory Fields)
ab9edbd script: create sane error return codes for script validation and remove logging (Cory Fields)
2014-11-17 21:15:09 +01:00
Wladimir J. van der Laan
1f0436f8cb
Merge pull request #5293
c63a73d Update comments in util to be doxygen compatible (Michael Ford)
2014-11-17 17:17:46 +01:00
Wladimir J. van der Laan
dbbe00f008
Merge pull request #5289
5617267 Fix typo in listreceivedbyaddress and listaccounts  help text (Michael Ford)
2014-11-17 17:14:38 +01:00
Wladimir J. van der Laan
47cb3606a3
Merge pull request #5292
7329fdd Update comments in txmempool to be doxygen compatible (Michael Ford)
2014-11-17 16:36:45 +01:00
Gavin Andresen
a8b2ce557d
regression test only setmocktime RPC call 2014-11-17 10:33:49 -05:00
Gavin Andresen
d6479ffc6a
Merge pull request #5275
1837987 Optimize -regtest setgenerate block generation (Gavin Andresen)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-11-17 10:26:12 -05:00
Jonas Schnelli
6093aa1bb0 [Qt, OSX] QProgressBar CPU-Issue workaround
fixes #5295
2014-11-17 15:59:33 +01:00
Michael Ford
c63a73d18a Update comments in util to be doxygen compatible 2014-11-17 11:04:01 +08:00
Michael Ford
7329fdd1ba Update comments in txmempool to be doxygen compatible
Fix typo in Read() error message
2014-11-17 10:29:09 +08:00
Luke Dashjr
5d60b694e9 Coin Control: Make list mode default 2014-11-16 17:27:19 +00:00
Luke Dashjr
4ff81d6092 Bugfix: Clarify coin control dialog labels 2014-11-16 17:16:14 +00:00
Michael Ford
5617267cd5 Fix typo in listreceivedbyaddress and listaccounts help text 2014-11-16 22:14:22 +08:00
Cozz Lovan
7335ca1a05 [Qt] Fix height of BitcoinAmountField 2014-11-16 01:07:09 +01:00
Cory Fields
219a1470c4 script: check ScriptError values in script tests 2014-11-14 16:25:53 -05:00
Cory Fields
ab9edbd6b6 script: create sane error return codes for script validation and remove logging
Attempt to codify the possible error statuses associated with script
validation. script/types.h has been created with the expectation that it will
be part of the public lib interface. The other flag enums will be moved here in
a future commit.

Logging has also been removed in order to drop the dependency on core.h. It can
be re-added to bitcoind as-needed. This makes script verification finally free
of application state and boost!
2014-11-14 16:25:53 -05:00
Gavin Andresen
18379875bf
Optimize -regtest setgenerate block generation
Speed up generating blocks in regression test mode, by moving
block-creating and nonce-finding directly into the setgenerate
RPC call (instead of starting up a mining thread and waiting for
it to find a block).

This makes the forknotify RPC test three times quicker, for
example (10 seconds runtime instead of 30 seconds, assuming
the initial blockchain cache is already built).
2014-11-14 13:42:15 -05:00
Wladimir J. van der Laan
3d3ce7421e
Merge pull request #5198
1c0aa91 Update serialize comments to be doxygen compatible (Michael Ford)
2014-11-13 19:41:56 +01:00
Wladimir J. van der Laan
6c5c06eff7
Merge pull request #5252
b9a36b1 Make comments in /src/script doxygen compatible (Michael Ford)
2014-11-13 17:51:57 +01:00
Philip Kaufmann
cd4d3f1915 Win32: change buffer size for gethotsname in Discover()
- 256 byte is the maximum, as per
  http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx
2014-11-13 15:26:09 +01:00
Philip Kaufmann
8fa0494e92 Win32: log addresses found in Discover() calls 2014-11-13 15:25:44 +01:00
Philip Kaufmann
13f903187c init: minor parameter interaction updates
- use __func__ instead of hard-coded function name for logging
- update -discover help message to reflect newly added parameter
  interaction
- use DEFAULT_LISTEN in a parameter interaction check instead a hard coded
  value
2014-11-13 15:15:53 +01:00
Wladimir J. van der Laan
ed98a6284b
Merge pull request #5203
0d91ae3 The first thing that SelectParams does is call SelectBaseParams. Therefore, we do not need to call SelectBaseParams immediately prior to calling SelectParams. (mruddy)
2014-11-13 13:14:45 +01:00
Jonas Schnelli
4a8fc152a9 [Qt] the RPC Console should be a QWidget to make window more independent
- fix issue #5254
2014-11-13 12:57:24 +01:00
Pieter Wuille
60672a61ff
Merge pull request #5256
f4e0aef Do signature-s negation inside the tests (Pieter Wuille)
2014-11-12 11:44:25 -08:00
Wladimir J. van der Laan
0c7862e968
Merge pull request #5161
845c86d Do not use third party services for IP detection. (Gregory Maxwell)
2014-11-12 18:35:45 +01:00
21E14
cca48f69b0 Reset setBlockIndexCandidates once block index db loaded 2014-11-12 00:35:24 -05:00
Jeff Garzik
e2655e0ab1 Add unauthenticated HTTP REST interface to public blockchain data. 2014-11-11 04:52:43 -05:00
sinetek
d52f072605 Don't show wallet options in the preferences menu when running with -disablewallet 2014-11-10 20:50:41 +01:00
Wladimir J. van der Laan
af3ec17f67
Merge pull request #5246
a8a5e01 Adding license. (sinetek)
2014-11-10 17:31:54 +01:00
Wladimir J. van der Laan
33d5ee6830
Merge pull request #5239
65e3a1e Make sure that GetRandomBytes never fails (Wladimir J. van der Laan)
2014-11-10 17:30:13 +01:00
Pieter Wuille
f4e0aefadc Do signature-s negation inside the tests
To avoid the need for libsecp256k1 to expose such functionality.
2014-11-10 05:03:24 -08:00
Pieter Wuille
5406f61373
Merge pull request #5249
38c62ae Adding const. (sinetek)
2014-11-10 04:29:57 -08:00
Peter Todd
7c041b3b91
Check against MANDATORY flags prior to accepting to mempool
Previously transactions were only tested again the
STANDARD_SCRIPT_VERIFY_FLAGS prior to mempool acceptance, so any bugs in
those flags that allowed actually-invalid transactions to pass would
result in allowing invalid transactions into the mempool. Fortunately
there is a second check in CreateNewBlock() that would prevent those
transactions from being mined, resulting in an invalid block, however
this could still be exploited as a DoS attack.
2014-11-10 02:52:28 -05:00
Michael Ford
b9a36b15bf Make comments in /src/script doxygen compatible 2014-11-10 14:51:55 +08:00
sinetek
38c62aec0d Adding const. 2014-11-08 18:09:06 -05:00
sinetek
a8a5e0133a Adding license. 2014-11-08 15:46:21 -05:00
Pieter Wuille
7b7c866160
Merge pull request #5210
1f84793 Avoid a bunch of copying/conversion in script/sign (Pieter Wuille)
2014-11-08 08:01:47 -08:00
Gregory Maxwell
845c86d128 Do not use third party services for IP detection.
This is a simplified re-do of closed pull #3088.

This patch eliminates the privacy and reliability problematic use
of centralized web services for discovering the node's addresses
for advertisement.

The Bitcoin protocol already allows your peers to tell you what
IP they think you have, but this data isn't trustworthy since
they could lie. So the challenge is using it without creating a
DOS vector.

To accomplish this we adopt an approach similar to the one used
by P2Pool: If we're announcing and don't have a better address
discovered (e.g. via UPNP) or configured we just announce to
each peer the address that peer told us. Since peers could
already replace, forge, or drop our address messages this cannot
create a new vulnerability... but if even one of our peers is
giving us a good address we'll eventually make a useful
advertisement.

We also may randomly use the peer-provided address for the
daily rebroadcast even if we otherwise have a seemingly routable
address, just in case we've been misconfigured (e.g. by UPNP).

To avoid privacy problems, we only do these things if discovery
is enabled.
2014-11-07 12:13:46 -08:00
Jonas Schnelli
31aac02446 Qt: new icons
- flat and b/w icons seems to be the new trend
- support for HiDPI/retina
- change icon sizes
- fix assets-attribution.md
- removed unused icons
2014-11-07 19:55:25 +01:00
Wladimir J. van der Laan
65e3a1e762
Make sure that GetRandomBytes never fails
We're using GetRandomBytes in several contexts where it's either
unwieldy to return an error, or an error would mean a fatal exception
anyhow.

@gmaxwell checked OpenSSL a while ago and discovered that it never
actually fails, but it can't hurt to be a bit paranoid here.
2014-11-07 13:49:25 +01:00
Ruben Dario Ponticelli
9ec75c5ef4
Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true. 2014-11-07 08:09:31 -03:00
ENikS
5985ba9e61 Fixing warning C4099: 'CExtPubKey' : type name first seen using 'class' now seen using 'struct' 2014-11-06 17:53:25 -05:00
Pieter Wuille
bfe029feeb Reduce bitcoin-tx dependencies 2014-11-06 00:24:41 -08:00
Pieter Wuille
df0a45503b
Merge pull request #5221
93a6022 Reduce bitcoin-cli dependencies (Pieter Wuille)
2014-11-06 00:06:01 -08:00
Wladimir J. van der Laan
f654f0040b
Change -genproclimit default to 1
This is less surprising.

Avoids the overload-the-CPU default of using N threads for script
verification as well as N threads for generation where N is number of cores.
2014-11-06 08:54:39 +01:00
Wladimir J. van der Laan
9bdec76037
Always log number of threads for script verification
Helps for troubleshooting.
2014-11-06 08:54:34 +01:00
Pieter Wuille
93a6022400 Reduce bitcoin-cli dependencies 2014-11-05 12:47:33 -08:00
Wladimir J. van der Laan
d064f7f3ee
Merge pull request #5215
93a3f0e Qt: Network-Traffic-Graph: make some distance between line and text (Jonas Schnelli)
2014-11-05 16:04:28 +01:00
Wladimir J. van der Laan
4e0e5e4bc8
Merge pull request #5218
236d96e Qt: Add support for missing scrollbar in peers table (Jonas Schnelli)
2014-11-05 15:58:49 +01:00
Jonas Schnelli
236d96e0a3 Qt: Add support for missing scrollbar in peers table 2014-11-05 11:45:37 +01:00
Jonas Schnelli
93a3f0e7fe Qt: Network-Traffic-Graph: make some distance between line and text
Text directly glued on the graph-line looks not so good.
2014-11-05 11:39:47 +01:00
Wladimir J. van der Laan
0778333b8c
Merge pull request #5173
50b43fd Be a bit more verbose during -loadblock if we already have blocks (Matt Corallo)
8375e22 Fix -loadblock after shutdown during IBD (Matt Corallo)
4ead850 Fix for crash during block download (Matt Corallo)
2014-11-05 09:40:25 +01:00
mruddy
84877904c0 bitcoin-tx: Add the "-txid" option. Also add the hex-encoded transaction to the JSON output as the "hex" property. 2014-11-04 21:43:03 -05:00
Pieter Wuille
1f847936c9 Avoid a bunch of copying/conversion in script/sign 2014-11-04 13:59:41 -08:00
Cozz Lovan
9b1627d13e [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis 2014-11-04 22:29:40 +01:00
Daniel Kraft
af82884ab7 Add "warmup mode" for RPC server.
Start the RPC server before doing all the (expensive) startup
initialisations like loading the block index.  Until the node is ready,
return all calls immediately with a new error signalling "in warmup"
with an appropriate status message (similar to the init message).

This is useful for RPC clients to know that the server is there (e. g.,
they don't have to start it) but not yet available.  It is used in
Namecoin and Huntercoin already for some time, and there exists a UI
hooked onto the RPC interface that actively uses this to its advantage.
2014-11-04 16:01:09 +01:00
Philip Kaufmann
b4347f6035 minor code style cleanup after recent merges
- add a missing license header
- correct some header orderings etc.
2014-11-04 14:36:46 +01:00
Pieter Wuille
1dbabb6521
Merge pull request #5191
a2cfae8 util.cpp comment correction (21E14)
2014-11-04 04:38:45 -08:00
mruddy
0d91ae308c The first thing that SelectParams does is call SelectBaseParams. Therefore, we do not need to call SelectBaseParams immediately prior to calling SelectParams. 2014-11-04 07:24:47 -05:00
Wladimir J. van der Laan
df504e924a
Merge pull request #5196
8473862 Fix all header defines (Pavel Janík)
2014-11-04 09:33:22 +01:00
Wladimir J. van der Laan
73b82a3089
Merge pull request #5162
d2e74c5 boost: moveonly: split CPubKey and friends to new files (Cory Fields)
78c228c boost: moveonly: move BIP32Hash to hash.h (Cory Fields)
900078a boost: moveonly: create eccryptoverify.h|cpp and move helper functions there (Cory Fields)
2014-11-04 09:26:45 +01:00
Wladimir J. van der Laan
ff17816abf
Merge pull request #3727
e69a587 RPC: submitblock: Support for returning specific rejection reasons (Luke Dashjr)
2014-11-03 20:55:46 +01:00
Wladimir J. van der Laan
7f7fede0eb
Merge pull request #5157
b4ee0bd Introduce preferred download peers (Pieter Wuille)
2014-11-03 16:40:36 +01:00
Pavel Janík
84738627ce Fix all header defines 2014-11-03 16:16:40 +01:00
Wladimir J. van der Laan
4e852e57b1
Merge pull request #5186
771d500 minor cleanup: include orders, end comments etc. (Philip Kaufmann)
2014-11-03 15:03:28 +01:00
Wladimir J. van der Laan
84d26d3a36
Merge pull request #5106
1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr)
d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr)
f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr)
24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
2014-11-03 12:22:45 +01:00
Wladimir J. van der Laan
2a6972133f
Merge pull request #5185
2191eac add tests to travis (Cory Fields)
7667850 tests: replace the old (unused since Travis) tests with new rpc test scripts (Cory Fields)
fa7f8cd tests: remove old pull-tester scripts (Cory Fields)
5122ea7 tests: fix forknotify.py on windows (Cory Fields)
7a41614 tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment (Cory Fields)
f635269 tests: enable alertnotify test for Windows (Cory Fields)
2014-11-03 09:23:17 +01:00
Wladimir J. van der Laan
7a9356bf16
Merge pull request #5169
20a5f61 Don't relay alerts to peers before version negotiation (Wladimir J. van der Laan)
2014-11-03 08:49:31 +01:00
21E14
a2cfae8e18 util.cpp comment correction 2014-11-01 09:41:48 -04:00
Wladimir J. van der Laan
04e988c6ce
Merge pull request #5145
484e350 Update comments in client version to be doxygen compatible (Michael Ford)
6395ba3 Update comments in version to be doxygen compatible (Michael Ford)
2014-10-31 16:30:55 +01:00
Pieter Wuille
7cd85f431a
Merge pull request #5187
e743678 fix a typo (Yoichi Hirai)
2014-10-31 05:47:08 -07:00
Yoichi Hirai
e743678d5a fix a typo 2014-10-31 20:51:05 +09:00
Wladimir J. van der Laan
917b83127d
qt: translations update from Transifex 2014-10-31 11:19:05 +01:00
Wladimir J. van der Laan
96012e83f1
Merge pull request #5077
2aa6329 Enable customising node policy for datacarrier data size with a -datacarriersize option (Luke Dashjr)
2014-10-31 11:16:09 +01:00
Wladimir J. van der Laan
7bb681d407
Merge pull request #5168
023e63d qt: Move transaction notification to transaction table model (Wladimir J. van der Laan)
2014-10-31 10:46:05 +01:00
Philip Kaufmann
771d500283 minor cleanup: include orders, end comments etc.
- no code changes
2014-10-31 09:41:15 +01:00
Cory Fields
d2e74c55bd boost: moveonly: split CPubKey and friends to new files 2014-10-31 01:19:37 -04:00
Cory Fields
78c228c6e5 boost: moveonly: move BIP32Hash to hash.h 2014-10-31 01:13:07 -04:00
Cory Fields
900078aeb4 boost: moveonly: create eccryptoverify.h|cpp and move helper functions there
Eventually (after 0.10) these files will hold the logic for crypto
verification routines, and CKey/CPubKey will call into them.
2014-10-31 01:13:07 -04:00
Michael Ford
1c0aa9110e Update serialize comments to be doxygen compatible 2014-10-31 13:07:05 +08:00
Cory Fields
f635269cd1 tests: enable alertnotify test for Windows
The semantics of "echo" are different there and they change the resulting text,
but they're still correct and predictable.
2014-10-31 00:04:14 -04:00
Michael Ford
484e350f04 Update comments in client version to be doxygen compatible 2014-10-31 08:27:27 +08:00
Michael Ford
6395ba3036 Update comments in version to be doxygen compatible 2014-10-31 08:20:17 +08:00
Wladimir J. van der Laan
8d2396c9c4
Merge pull request #5164
71697f9 Separate protocol versioning from clientversion (Cory Fields)
2014-10-30 17:24:36 +01:00
Wladimir J. van der Laan
c4761ffb70
Merge pull request #5146
5b40d88 Update comments in wallet to be doxygen compatible (Michael Ford)
2014-10-30 17:15:09 +01:00
Wladimir J. van der Laan
393a28a50c
Merge pull request #5174
7792040 Update comments in rpcserver to be doxygen compatible (Michael Ford)
2014-10-30 17:13:25 +01:00
Wladimir J. van der Laan
4f5f490ce0
Merge pull request #5167
2d06c0f Add missing reserved address spaces. (Matt Corallo)
2014-10-30 17:09:18 +01:00
Wladimir J. van der Laan
d5e5d1412e
Merge pull request #5172
eadcd0c Print parameter interactions to console, too (Matt Corallo)
2014-10-30 17:03:30 +01:00
Wladimir J. van der Laan
c1def0df51
Merge pull request #5176
981f790 [Qt] fix slot connection problems when no wallet is loaded (Philip Kaufmann)
2014-10-30 14:41:45 +01:00
Wladimir J. van der Laan
f157cbb443
Merge pull request #5142
02fe12d Update generate-seeds.py to produce doxygen compatible comments (Michael Ford)
f2e03ff Update comments in chainparams to be doxygen compatible (Michael Ford)
2fdc335 Update comments in chain to be doxygen compatible (Michael Ford)
2014-10-30 10:28:42 +01:00
Wladimir J. van der Laan
4bbcc8d0e7
Merge pull request #5148
2b173d3 Update comments in keystore to be doxygen compatible (Michael Ford)
ffd8edd Update comments in key to be doxygen compatible (Michael Ford)
2014-10-30 10:09:23 +01:00
Philip Kaufmann
981f7907c4 [Qt] fix slot connection problems when no wallet is loaded
- guard 4 connect calls by an #ifdef when no wallet is loaded to fix "No
  such slot" warnings
- also add comments when #ifdef ENABLE_WALLET end
- fixes #5175
2014-10-30 09:31:36 +01:00
Michael Ford
7792040294 Update comments in rpcserver to be doxygen compatible 2014-10-30 10:14:08 +08:00
Matt Corallo
eadcd0c802 Print parameter interactions to console, too 2014-10-29 19:10:00 -07:00
Luke Dashjr
e69a5873e7 RPC: submitblock: Support for returning specific rejection reasons 2014-10-30 02:03:43 +00:00
Luke Dashjr
b468e81443 Qt: Clarify sign/verify dialog text to specifically state that these messages only prove one receives with the address in question, and makes no claim to sender of transactions 2014-10-30 01:36:50 +00:00
Matt Corallo
50b43fda08 Be a bit more verbose during -loadblock if we already have blocks 2014-10-29 17:02:48 -07:00
Matt Corallo
8375e2215f Fix -loadblock after shutdown during IBD 2014-10-29 17:01:18 -07:00
Matt Corallo
4ead850fe5 Fix for crash during block download 2014-10-29 17:01:01 -07:00
jtimon
092b58d13d CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex) 2014-10-29 21:01:07 +01:00
jtimon
22c4272bf4 MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h) 2014-10-29 21:00:05 +01:00
Pieter Wuille
b4ee0bddad Introduce preferred download peers 2014-10-29 08:08:13 -07:00
Wladimir J. van der Laan
20a5f610d3 Don't relay alerts to peers before version negotiation
Fixes #1436
2014-10-29 16:05:46 +01:00
Matt Corallo
2d06c0febf Add missing reserved address spaces. 2014-10-28 23:54:39 -07:00
Cory Fields
71697f97d3 Separate protocol versioning from clientversion 2014-10-29 00:24:40 -04:00
Ruben Dario Ponticelli
a2d0fc658a
Fix IsInitialBlockDownload which was broken by headers first. 2014-10-28 18:16:52 -03:00
Wladimir J. van der Laan
023e63df78 qt: Move transaction notification to transaction table model
Move transaction new/update notification to TransactionTableModel.
This moves the concerns to where they're actually handled.
No need to bounce this through wallet model.

- Do wallet transaction preprocessing on signal handler side;
  avoids locking cs_main/cs_wallet on notification in GUI thread
  (except for new transactions)
2014-10-28 21:20:55 +01:00
Pieter Wuille
723c752636
Merge pull request #5100
99f41b9 MOVEONLY: core.o -> core/block.o (jtimon)
561e9e9 MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (from core) with it (jtimon)
999a2ab MOVEONLY: separate CTxUndo out of core (jtimon)
4a3587d MOVEONLY: Separate CTransaction and dependencies from core (jtimon)
eda3733 MOVEONLY: Move CFeeRate and Amount constants to amount.o (jtimon)
2014-10-28 05:27:41 -07:00
Wladimir J. van der Laan
cd9114e513
Merge pull request #5065
16d78bd Add valid invert of invalid every numeric opcode tests (Peter Todd)
2b62e17 Clearly separate PUSHDATA and numeric argument MINIMALDATA tests (Peter Todd)
dfeec18 Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule (Peter Todd)
554147a Ensure MINIMALDATA invalid tests can only fail one way (Peter Todd)
6004e77 Improve CScriptNum() comment (Peter Todd)
698c6ab Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4) (Pieter Wuille)
d752ba8 Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) (Pieter Wuille)
2014-10-28 13:19:38 +01:00
Luke Dashjr
1bea2bbddc Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it 2014-10-28 08:15:14 +00:00
Michael Ford
2b173d3bcc Update comments in keystore to be doxygen compatible 2014-10-28 12:06:59 +08:00
Michael Ford
ffd8eddab5 Update comments in key to be doxygen compatible 2014-10-28 12:02:25 +08:00
Michael Ford
5b40d88688 Update comments in wallet to be doxygen compatible 2014-10-28 11:47:49 +08:00
Pieter Wuille
068b7f8ee2
Merge pull request #5118
50f71cd boost: code movement only: split CECKey into separate files (Cory Fields)
bdaec6a boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48 (Cory Fields)
2014-10-27 20:47:32 -07:00
Cory Fields
50f71cd52e boost: code movement only: split CECKey into separate files 2014-10-27 15:00:58 -04:00
Cory Fields
bdaec6abd3 boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48 2014-10-27 14:39:32 -04:00
Gavin Andresen
35ece7dd07
Merge pull request #5135
a31e8ba Make CBlockIndex* returned by GetDepthInMainChain const. (Daniel Kraft)

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

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

exception on shutdown.

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

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

Becomes:
CScript foo;
CScriptID bar(foo);

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

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

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

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

Also add MINIUPNPC_LIBS which was missing before, and hook it up to
executables.
2014-10-13 21:21:27 -04:00
Luke
e21b2e0d5f Typo in test 2014-10-13 16:57:09 +01:00
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
Cozz Lovan
44bc988e7b [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) 2014-10-03 05:11:27 +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