Commit Graph

12448 Commits

Author SHA1 Message Date
Pieter Wuille 819ca3f18e Remove mapOrphanTransactionsByPrev from DoS_tests
This is another violation of the one definition rule, as the type
for mapOrphanTransactionsByPrev did not match the one in
net_processing.cpp anymore. As it now depends on a custom Iterator,
it seems too much hassle to correctly expose it to the tests.
Instead, this commit just removes the one test it was referenced in.
2016-12-05 23:04:50 -08:00
Russell Yanofsky 07df40babb [test] Add CCoinsViewCache Access/Modify/Write tests
Add more comprehensive unit tests for CCoinsViewCache. Right now it is hard to
refactor caching code or fix bugs in the caching logic because you have to try
to mentally enumerate all the different states the cache might be in to make
sure a change doesn't cause unintended consequences. The new tests explicitly
enumerate relevant cache states, documenting and verifying the behavior in each
state, so it will be safer and easier to make changes to the caching code in
the future.
2016-12-05 18:30:46 -05:00
Alex Morcos a874ab5ccf remove internal tracking of mempool conflicts for reporting to wallet 2016-12-05 13:41:25 -05:00
Alex Morcos bf663f8e93 remove external usage of mempool conflict tracking 2016-12-05 13:41:25 -05:00
Jonas Schnelli 89a3723bdc
[Qt] Show ModalOverlay by pressing the progress bar, disabled show() in sync mode 2016-12-05 13:58:00 +01:00
instagibbs 412bab22b2 Adapt ZMQ/rest serialization to take rpcserialversion arg 2016-12-05 07:43:22 -05:00
Gregory Sanders bc7ff8db99 Add option to return non-segwit serialization via rpc 2016-12-05 07:43:22 -05:00
Wladimir J. van der Laan 7d5d44969b
Merge #9282: CMutableTransaction is defined as struct
c4b6fa8 CMutableTransaction is defined as struct. (Pavel Janík)
2016-12-05 12:55:03 +01:00
Wladimir J. van der Laan c01f16aaa0
Merge #9165: SendMoney: use already-calculated balance
ea83d00 SendMoney: use already-calculated balance (instagibbs)
2016-12-05 12:47:31 +01:00
Pavel Janík c4b6fa8edf CMutableTransaction is defined as struct. 2016-12-05 11:13:17 +01:00
Wladimir J. van der Laan 43e8150ef6
Merge #9269: Align struct COrphan definition
2efc438 Align struct COrphan definition (Pieter Wuille)
2016-12-05 11:09:26 +01:00
Wladimir J. van der Laan 613bda418f
Merge #8613: LevelDB 1.19
634ad51 Squashed 'src/leveldb/' changes from 20ca81f..a31c8aa (Pieter Wuille)
2016-12-05 10:58:36 +01:00
Pieter Wuille 2efc43874c Align struct COrphan definition 2016-12-05 00:35:07 -08:00
Pieter Wuille f6fb7acda4 Move CTxInWitness inside CTxIn 2016-12-04 23:47:12 -08:00
Wladimir J. van der Laan d04aebaec7
Merge #9014: Fix block-connection performance regression
dd0df81 Document ConnectBlock connectTrace postconditions (Matt Corallo)
2d6e561 Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo)
2736c44 Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo)
ae4db44 Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo)
fd9d890 Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo)
6fdd43b Add struct to track block-connect-time-generated info for callbacks (Matt Corallo)
2016-12-05 08:07:45 +01:00
Wladimir J. van der Laan 46904ee5d2
Merge #8580: Make CTransaction actually immutable
81e3228 Make CTransaction actually immutable (Pieter Wuille)
42fd8de Make DecodeHexTx return a CMutableTransaction (Pieter Wuille)
c3f5673 Make CWalletTx store a CTransactionRef instead of inheriting (Pieter Wuille)
a188353 Switch GetTransaction to returning a CTransactionRef (Pieter Wuille)
2016-12-05 08:05:48 +01:00
MarcoFalke fab1af31d4 [qa] maxuploadtarget: Use cached utxo set 2016-12-05 00:31:10 +01:00
Alex Morcos 30b620c48a remove obsolete run-bitcoind-for-test.sh 2016-12-04 15:44:41 -05:00
MarcoFalke fa2ecc48fb [qa] pruning: Use cached utxo set to run faster 2016-12-04 21:30:20 +01:00
Jonas Schnelli 4d955fc582
Merge #9218: qt: Show progress overlay when clicking spinner icon
042f9fa qt: Show progress overlay when clicking spinner icon (Wladimir J. van der Laan)
827d9a3 qt: Replace NetworkToggleStatusBarControl with generic ClickableLabel (Wladimir J. van der Laan)
2016-12-04 20:57:57 +01:00
Matt Corallo a13fa4c80f Remove unused CDiskBlockPos* argument from ProcessNewBlock 2016-12-04 00:23:17 -08:00
Matt Corallo dd0df81ebd Document ConnectBlock connectTrace postconditions 2016-12-04 00:18:44 -08:00
Matt Corallo 2d6e5619af Switch pblock in ProcessNewBlock to a shared_ptr
This (finally) fixes a performance regression in
b3b3c2a562
2016-12-04 00:17:30 -08:00
Matt Corallo 2736c44c8e Make the optional pblock in ActivateBestChain a shared_ptr 2016-12-04 00:13:09 -08:00
Matt Corallo ae4db44d03 Create a shared_ptr for the block we're connecting in ActivateBCS 2016-12-04 00:13:09 -08:00
Matt Corallo fd9d89070a Keep blocks as shared_ptrs, instead of copying txn in ConnectTip 2016-12-04 00:13:09 -08:00
Matt Corallo 6fdd43b968 Add struct to track block-connect-time-generated info for callbacks 2016-12-04 00:13:09 -08:00
Alex Morcos 2a99522bbf remove relaypriority from rpc tests 2016-12-03 18:03:51 -05:00
Alex Morcos e2184ccc1d Reorder RPC tests for running time 2016-12-03 15:46:33 -05:00
Gregory Maxwell 749be013f5 Move GetWarnings() into its own file. 2016-12-03 07:17:34 +00:00
Gregory Maxwell e3ba0ef956 Eliminate data races for strMiscWarning and fLargeWork*Found.
This moves all access to these datastructures through accessor functions
 and protects them with a lock.
2016-12-03 07:17:34 +00:00
Gregory Maxwell c63198f1c7 Make QT runawayException call GetWarnings instead of directly access strMiscWarning.
This is a first step in avoiding racy accesses to strMiscWarning.

The change required moving GetWarnings and related globals to util.
2016-12-03 07:17:28 +00:00
Matt Corallo 9b9324ee49 Fix rounding privacy leak introduced in #9260 2016-12-02 21:30:36 -08:00
Pieter Wuille 81e3228fcb Make CTransaction actually immutable 2016-12-02 18:37:43 -08:00
Pieter Wuille 42fd8dee30 Make DecodeHexTx return a CMutableTransaction 2016-12-02 18:28:22 -08:00
Pieter Wuille c3f5673a63 Make CWalletTx store a CTransactionRef instead of inheriting 2016-12-02 18:28:22 -08:00
Pieter Wuille a1883536b4 Switch GetTransaction to returning a CTransactionRef 2016-12-02 18:28:22 -08:00
Pieter Wuille 2efcfa5acf
Merge #9260: Mrs Peacock in The Library with The Candlestick (killed main.{h,cpp})
76faa3c Rename the remaining main.{h,cpp} to validation.{h,cpp} (Matt Corallo)
e736772 Move network-msg-processing code out of main to its own file (Matt Corallo)
87c35f5 Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo)
2016-12-02 18:25:40 -08:00
MarcoFalke c36229b0b2
Merge #9251: Improvement of documentation of command line parameter 'whitelist'
8a70a9d Improvement of documentation of command line parameter 'whitelist' (wodry)
2016-12-02 20:34:06 +01:00
MarcoFalke 9e4bb312e6
Merge #9221: [qa] Get rid of duplicate code
facbfa5 [qa] Get rid of duplicate code (MarcoFalke)
2016-12-02 20:17:51 +01:00
Matt Corallo 76faa3cdfe Rename the remaining main.{h,cpp} to validation.{h,cpp} 2016-12-02 09:42:51 -08:00
Matt Corallo e736772c56 Move network-msg-processing code out of main to its own file 2016-12-02 09:42:51 -08:00
MarcoFalke d7ba4a233b
Merge #9257: [qa] Dump debug logs on travis failures.
0828619 [qa] Dump debug logs on travis failures. (Suhas Daftuar)
2016-12-02 16:41:12 +01:00
MarcoFalke facbfa5816 [qa] Get rid of duplicate code 2016-12-02 16:32:00 +01:00
MarcoFalke 98514988a3
Merge #9246: Developer docs about existing subtrees.
08ed8c1 Developer docs about existing subtrees. (Gregory Maxwell)
2016-12-02 16:20:24 +01:00
MarcoFalke 5412c08c3c
Merge #9223: unification of Bloom filter representation
b7aa290 unification of Bloom filter representation (S. Matthew English)
2016-12-02 15:58:57 +01:00
MarcoFalke 31bcc66786
Merge #9265: bitcoin-cli: Make error message less confusing
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
2016-12-02 15:55:23 +01:00
Gregory Maxwell 08ed8c1d07 Developer docs about existing subtrees.
Add some notes about the workflow for changes to code that exists in subtrees.
2016-12-02 14:34:20 +00:00
Luke Dashjr df17fe046f Bugfix: Qt/RPCConsole: Put column enum in the right places
QModelIndex::data argument is a role, not a column
2016-12-02 13:51:14 +00:00
Wladimir J. van der Laan fe37fbe606 bitcoin-cli: Make error message less confusing
Sorry for the churn on this, but the current message (introduced in #9073)
isn't acceptable:

    $ src/bitcoin-cli getinfo
    rpc: couldn't connect to server
    (make sure server is running and you are connecting to the correct RPC port: -1 unknown)

Putting the error code after the words "RPC port" made me wonder whether
there was a port configuration issue.

This changes it to:

    $ src/bitcoin-cli getinfo
    error: couldn't connect to server: unknown (code -1)
    (make sure server is running and you are connecting to the correct RPC port)
2016-12-02 08:55:18 +01:00