Commit Graph

16103 Commits

Author SHA1 Message Date
UdjinM6
d3bd9b633e
Merge pull request #2934 from PastaPastaPasta/backports-0.15-pr12
Backports 0.15 pr12
2019-05-28 20:32:03 +03:00
Alexander Block
53cce815d5
Merge pull request #2943 from codablock/pr_dsnotification
Refactor validation signals for ChainLocks, InstantSend and PrivateSend to get rid of SyncTransaction
2019-05-28 18:26:02 +02:00
Pasta
d36c408a68
bump version in fees.cpp
Signed-off-by: Pasta <Pasta@dash.org>
2019-05-28 08:42:15 -05:00
Pasta
81afb1058b
remove nodehandling.py
Signed-off-by: Pasta <Pasta@dash.org>
2019-05-28 08:36:28 -05:00
UdjinM6
788973a8a6
Fix disconnect_ban.py
We run tests in mocked time, need to bump it here for "remove from ban list after 1 sec" logic to triger.
2019-05-28 08:33:47 -05:00
Alexander Block
e6a0b2162b
Add missing include for CKeyID 2019-05-28 08:33:11 -05:00
UdjinM6
60a8a93578 Drop CDSNotificationInterface::SyncTransaction() 2019-05-28 11:59:55 +02:00
Pasta
95f4cf4419
add #include "policy/fees.h" to validation.cpp
Signed-off-by: Pasta <Pasta@dash.org>
2019-05-27 17:00:26 -05:00
Wladimir J. van der Laan
f8c5a14f3d
Merge #9942: Refactor CBlockPolicyEstimator
68af651 MOVEONLY: move TxConfirmStats to cpp (Alex Morcos)
2332f19 Initialize TxConfirmStats in constructor (Alex Morcos)
5ba81e5 Read and Write fee estimate file directly from CBlockPolicyEstimator (Alex Morcos)
14e10aa Call estimate(Smart)Fee directly from CBlockPolicyEstimator (Alex Morcos)
dbb9e36 Give CBlockPolicyEstimator it's own lock (Alex Morcos)
f6187d6 Make processBlockTx private. (Alex Morcos)
ae7327b Make feeEstimator its own global instance of CBlockPolicyEstimator (Alex Morcos)

Tree-SHA512: dbf3bd2b30822e609a35f3da519b62d23f8a50e564750695ddebd08553b4c01874ae3e07d792c6cc78cc377d2db33b951ffedc46ac7edaf5793f9ebb931713af

finish #9942 by removing removed functions

Signed-off-by: Pasta <Pasta@dash.org>
2019-05-27 16:58:28 -05:00
Alexander Block
8675a5064d Add TODO comment about need to remove compatibility code 2019-05-27 16:40:05 +02:00
Alexander Block
617c4a4cc0 Use mapDSTX.find() instead of count() and [] 2019-05-27 16:40:05 +02:00
Alexander Block
8df25bbfe4 Call and implemente new signals in CPrivateSend
Instead of relying on CDSNotificationInterface running compatibility code.
This also removes locking of cs_main, as this seemed to be not needed.
2019-05-27 16:40:05 +02:00
Alexander Block
816efa9cd4 Add missing directories to CMakeLists.txt and sort the list 2019-05-27 16:40:05 +02:00
Alexander Block
715a3e9518 Move updating of txFirstSeenTime into TransactionAddedToMempool and BlockConnected
This removes the need for SyncTransaction
2019-05-27 16:40:05 +02:00
Alexander Block
a61127e1ae Move filling of blockTxs into BlockConnected
Also add code to remove entries in blockTxs when BlockDisconnected is
called.
2019-05-27 16:40:05 +02:00
Alexander Block
d4e75abbfd Call new signals in CChainLocksHandler 2019-05-27 16:40:05 +02:00
Alexander Block
25c40fe409 Fix typo 2019-05-27 16:40:05 +02:00
Alexander Block
5233045373 Don't check for posInBlock when updating pindexMined
ProcessNewTransaction is now only called with pindex != nullptr when a
block is connected but never when it is disconnected, so there is no need
to check for posInBlock anymore (we don't even have it now).
2019-05-27 16:40:05 +02:00
Alexander Block
0b4f7b9b6d Move removal of mined-locks info to BlockDisconnected 2019-05-27 16:40:05 +02:00
Alexander Block
b645757be9 Call RemoveConflictedTx from BlockConnected instead of ProcessNewTransaction 2019-05-27 16:40:05 +02:00
Alexander Block
b36f0a324f Call new signals instead of SyncTransaction on CInstantSendManager
This commit moves all logic of SyncTransaction into ProcessNewTransaction
and then calls it from TransactionAddedToMempool and BlockConnected.

This won't compile/work at first, but the next commits will fix this.
2019-05-27 16:40:05 +02:00
Alexander Block
6afa605f6f Pass disconnected/deleted pindex instead of pprev into BlockDisconnected
CDSNotificationInterface::BlockDisconnected still calls SyncTransaction
with pprev to keep compatibility.
2019-05-27 16:40:05 +02:00
UdjinM6
f4aaf56251
Merge pull request #2931 from PastaPastaPasta/backports-0.15-pr11
Backports 0.15 pr11
2019-05-27 17:39:17 +03:00
UdjinM6
9b8a750c95
More boost::filesystem->fs and some related cleanup 2019-05-27 09:03:19 -05:00
UdjinM6
250195185f
Adjust CDSNotificationInterface to align with CValidationInterface changes 2019-05-27 09:03:19 -05:00
UdjinM6
d180061b80
Pass block index via BlockDisconnected 2019-05-27 09:03:19 -05:00
Pasta
282d1554df
adjust examples/dash.conf
Signed-off-by: Pasta <Pasta@dash.org>
2019-05-27 09:03:19 -05:00
Wladimir J. van der Laan
e451325d6d
Merge #10186: Remove SYNC_TRANSACTION_NOT_IN_BLOCK magic number
d0cd0bd Make CWallet::SyncTransactions() interface friendlier (John Newbery)
714e4ad AddToWalletIfInvolvingMe should test pIndex, not posInBlock (John Newbery)

Tree-SHA512: d02e7ffce635c53f3e099c37cc5613b431f74e0e3ea189269132901a99fc539477849ddad0282ce721d46a4d794c2d46523d58b64f0c26c655f70b5808c745a5
2019-05-27 09:03:19 -05:00
Wladimir J. van der Laan
60438257a5
Merge #9725: CValidationInterface Cleanups
b1a6d4c Take a CTransactionRef in AddToWalletIfInvolvingMe to avoid a copy (Matt Corallo)
1c95e2f Use std::shared_ptr instead of boost::shared_ptr in ScriptForMining (Matt Corallo)
91f1e6c Remove dead-code tracking of requests for blocks we generated (Matt Corallo)
acad82f Add override to functions using CValidationInterface methods (Matt Corallo)
e6d5e6c Hold cs_wallet for whole block [dis]connection processing (Matt Corallo)
461e49f SyncTransaction->TxAddedToMempool/BlockConnected/Disconnected (Matt Corallo)
f404334 Handle SyncTransaction in ActivateBestChain instead of ConnectTrace (Matt Corallo)
a147687 Keep conflictedTxs in ConnectTrace per-block (Matt Corallo)
d3167ba Handle conflicted transactions directly in ConnectTrace (Matt Corallo)
29e6e23 Make ConnectTrace::blocksConnected private, hide behind accessors (Matt Corallo)
822000c Add pblock to connectTrace at the end of ConnectTip, not start (Matt Corallo)
f5e9a01 Include missing #include in zmqnotificationinterface.h (Matt Corallo)

Tree-SHA512: 8893d47559da3b28d2ef7359768547cba8a4b43b6f891d80f5848f995a84b1517bfb0f706fdc8cd43f09a1350349eb440d9724a59363ab517dfcc4fcb31b2018
2019-05-27 09:03:19 -05:00
MarcoFalke
f893ac66ca
Merge #10124: [test] Suppress test logging spam
45ce471 Reduce spammy test logging (John Newbery)

Tree-SHA512: 64b2ce29fb62a4e738840bbaf93563559451c2ef078ba66ecfc1dbe34adefea61ad2ad2d768444cb2e0b30cb3cbe47e38ed818d4c91f7723a3d1ba9fdd0043f9
2019-05-27 09:03:19 -05:00
Wladimir J. van der Laan
a54ff70ff4
Merge #9902: Lightweight abstraction of boost::filesystem
f110272 Remove `namespace fs=fs` (Wladimir J. van der Laan)
75594bd torcontrol: Use fs::path instead of std::string for private key path (Wladimir J. van der Laan)
2a5f574 Use fsbridge for fopen and freopen (Wladimir J. van der Laan)
bac5c9c Replace uses of boost::filesystem with fs (Wladimir J. van der Laan)
7d5172d Replace includes of boost/filesystem.h with fs.h (Wladimir J. van der Laan)
19e36bb Add fs.cpp/h (Wladimir J. van der Laan)

Tree-SHA512: 2c34f059dfa6850b9323f3389e9090a6b5f839a457a2960d182c2ecfafd9883c956f5928bb796613402d3aad68ebc78259796a7a313f4a6cfa98aaf507a66842
2019-05-27 09:03:19 -05:00
Wladimir J. van der Laan
5153439633
Merge #10036: Fix init README format to render correctly on github
b99fbad Fix init README format to render correctly on github (Jameson Lopp)

Tree-SHA512: 52b8ed9661e48e830c9e0c0e9aa670fe8d1a3848426d2d854494b477a9926f286d87e0586c2bc63f433136f8e5acd2cab3ab1f616380fb517c5a8f9d34ed52da
2019-05-23 09:32:05 -05:00
MarcoFalke
c8a565d6e6
Merge #10090: Update bitcoin.conf with example for pruning
c0651cc Update bitcoin.conf with example for pruning (Kyle Honeycutt)

Tree-SHA512: f27180ac5d5a4bd32c7a63de156ca14eb8068509e64d386ca84ee16d0dacfa8e1bab9a8e7b88175fae12c8d823f71f8705d413f224a15d5aa7cf059f416fa023
2019-05-23 07:58:32 -05:00
Wladimir J. van der Laan
6f558270d4
Merge #10143: [net] Allow disconnectnode RPC to be called with node id
d54297f [tests] disconnect_ban: add tests for disconnect-by-nodeid (John Newbery)
5cc3ee2 [tests] disconnect_ban: remove dependency on urllib (John Newbery)
12de2f2 [tests] disconnect_ban: use wait_until instead of sleep (John Newbery)
2077fda [tests] disconnect_ban: add logging (John Newbery)
395561b [tests] disconnectban test - only use two nodes (John Newbery)
e367ad5 [tests] rename nodehandling to disconnectban (John Newbery)
d6564a2 [tests] fix nodehandling.py flake8 warnings (John Newbery)
23e6e64 Allow disconnectnode() to be called with node id (John Newbery)

Tree-SHA512: a371bb05a24a91cdb16a7ac4fbb091d5d3bf6554b29bd69d74522cb7523d3f1c5b1989d5e7b03f3fc7369fb727098dd2a549de551b731dd480c121d9517d3576
2019-05-23 07:43:01 -05:00
Jonas Schnelli
4efa99c2df
Merge #10221: Stop treating coinbase outputs differently in GUI: show them at 1conf
608bbcc [qt] Stop treating coinbase outputs differently: show them at 1conf (Matt Corallo)

Tree-SHA512: 62ba10520da8b83cf8e97c86dec3ccdcca8b7bfae0174d1a4099d33aa5d11933cc7c248394bf67c2b105211cf7931955816c741957832e703211030c7f4f002f
2019-05-23 07:43:01 -05:00
Wladimir J. van der Laan
16053cd528
Merge #10226: wallet: Use boost to more portably ensure -wallet specifies only a filename
a4186dd wallet: Use boost to more portably ensure -wallet specifies only a filename (Luke Dashjr)

Tree-SHA512: 6dfde31fa599638e5ec76489363e2fed97403be3e5762e4560dfc6ac261ce169a92b5a1b92bb34a893cc898e6073c81f74f49528e8df07e86273ddb37dd1ce80
2019-05-23 07:43:01 -05:00
MarcoFalke
7fa60a1c73
Merge #10219: Tests: Order Python Tests Differently
637706d Tests: Put Extended tests first when they're included (Jimmy Song)

Tree-SHA512: 0a720b2443b3e65f4ad548ecdf822468460fc4f4ecf32385dd79511a01c9ea4c94f0bf765ca593705b19baee1bae254dfcc3952da64b9c51d75b7da7abcdcd28
2019-05-23 07:43:01 -05:00
Wladimir J. van der Laan
0b232fd1cf
Merge #10208: [wallet] Rescan abortability
9141622 [rpc] Add abortrescan command to RPC interface. (Kalle Alm)
75a08e7 [wallet] Add support for aborting wallet transaction rescans. (Kalle Alm)

Tree-SHA512: 18545a1dc48c6dc112993f971f3adc7c0341fa621186c6d70bef1052e1d127ca116c5769595d721a209d502ca2019f2ad33876fe35d2b17216393404607a6c76
2019-05-23 07:43:01 -05:00
Pieter Wuille
55d1251ffc
Merge #9480: De-duplicate SignatureCacheHasher
f9c8807 Deduplicate SignatureCacheHasher (Jeremy Rubin)

Tree-SHA512: 714a0f39d1c836fedd1868369b4ebf1096cd800cc544d57b54101da338c80c627a3e59c6644b3268054efe85053cf1a7be508af935f624491e7acfae61123994
2019-05-23 07:42:36 -05:00
UdjinM6
428f304506
Implement rawchainlocksig and rawtxlocksig (#2930)
* Pass is-lock into `CInstantSendManager::UpdateWalletTransaction()`

* Implement `rawtxlocksig` which pushes tx+islock

* Implement `rawchainlocksig` which pushes block+clsig

* fix log category
2019-05-23 12:13:58 +03:00
UdjinM6
c08e761015
Tighten rules for DSVIN/DSTX (#2897)
* Tighten rules for dstx

* Tighten rules for dsvin

* NULL -> nullptr

* Make `ConsumeCollateral()` a private function instead of a lamda and reuse it in `Charge*Fees()`

* Make sure inputs and outputs are of the same size

Introduces new response ERR_SIZE_MISMATCH, old clients will simply bail out.

* Drop now redundant vecTxOut.size() check

* Check max inputs size

* Fix log category
2019-05-23 12:13:34 +03:00
PastaPastaPasta
29194b1f5a Backport Bitcoin#9424, Bitcoin#10123 and Bitcoin#10153 (#2918)
* Contains dashification. disables `-debug dash`
Merge #9424: Change LogAcceptCategory to use uint32_t rather than sets of strings.

6b3bb3d Change LogAcceptCategory to use uint32_t rather than sets of strings. (Gregory Maxwell)

Tree-SHA512: ebb5bcf9a7d00a32dd1390b727ff4d29330a038423611da01268d8e1d2c0229e52a1098e751d4e6db73ef4ae862e1e96d38249883fcaf12b68f55ebb01035b34
Signed-off-by: Pasta <Pasta@dash.org>

31 -> 32

Signed-off-by: Pasta <Pasta@dash.org>

* Merge #10123: Allow debug logs to be excluded from specified component

3bde556 Add -debugexclude option to switch off logging for specified components (John Newbery)

Tree-SHA512: 30202e3f2085fc2fc5dd4bedb92988f4cb162c612a42cf8f6395a7da326f34975ddc347f82bc4ddca6c84c438dc0cc6e87869f90c7ff88105dbeaa52a947fa43

* bump to uint64_t due to added Dash codes

Signed-off-by: Pasta <Pasta@dash.org>

* bump to uint64_t due to added Dash codes cont.

Signed-off-by: Pasta <Pasta@dash.org>

* string -> BCLog format

Signed-off-by: Pasta <Pasta@dash.org>

* uint32_t -> uint64_t

Signed-off-by: Pasta <Pasta@dash.org>

* Fix CBatchedLogger

* Fix most fDebug-s

* Fix `debug` rpc

* Fix BENCH and RAND conflicts

* Add ALERT and use it

* Update LogPrint-s in dash-specific code

* Tweak few log categories

Specifically:
- use PRIVATESEND in `CPrivateSendClientManager::GetRandomNotUsedMasternode()`
- use ZMQ in `CZMQPublishRawGovernanceVoteNotifier::NotifyGovernanceVote()` and `CZMQPublishRawGovernanceObjectNotifier::NotifyGovernanceObject()`

* Drop no longer used MASTERNODE category

* Merge #10153: logging: Fix off-by-one for shrinkdebugfile default

faab624 logging: Fix off-by-one for shrinkdebugfile (MarcoFalke)

Tree-SHA512: d6153e06067906172ff0611af9e585a3ecf0a7d56925b6ad7c12e75aa802441047059b9b6f6c78e79916c3f2abc8f1998bfd2d5b84201ec6421f727c08da3c21

* Shift dash-specific log categories to start from `1ul << 32` to avoid potential future conflicts with bitcoin ones

* Fix `dash` category

* remove debugCategories

Signed-off-by: Pasta <Pasta@dash.org>

* Prepend "std::" to find call

* Check for BCLog::PRIVATESEND instead of logCategories != BCLog::NONE

* Use BCLog::MNPAYMENTS category instead of checking for logCategories != BCLog::NONE

* Move "End Dash" comment below "ALERT"

When adding new entries here, we'll otherwise get confused with ordering
and might end up forgetting that adding something Dash specific must
continue with the bit after 43.
2019-05-23 00:51:39 +03:00
Alexander Block
f1fe24b676 Only gracefully timeout Travis when integration tests need to be run (#2933)
* Split RUN_TESTS into RUN_UNITTESTS and RUN_INTEGRATIONTESTS

* Only gracefully timeout when RUN_INTEGRATIONTESTS=true
2019-05-23 00:21:21 +03:00
Alexander Block
7c05aa8213 Also gracefully timeout Travis builds when building source takes >30min (#2932)
We assume 15-20 minutes for running integration tests, so we can spend a
maximum of 30 minutes for building depends and source.
2019-05-22 22:49:05 +03:00
UdjinM6
92e5a38314
Merge pull request #2911 from PastaPastaPasta/backports-0.15-pr10
Backports 0.15 pr10
2019-05-22 17:50:44 +03:00
UdjinM6
44b7e55fe9
Merge pull request #2771 from PastaPastaPasta/backports-0.15-pr9
Backports 0.15 pr9
2019-05-22 16:18:21 +03:00
Alexander Block
5652ea0237 Show number of InstantSend locks in Debug Console (#2919)
* Implement GetInstantSendLockCount in CInstantSendManager

* Add islockCountChanged signal to client model

* Show number of InstantSend locks in debug console
2019-05-22 09:35:51 +03:00
UdjinM6
15fa1873d8
Drop redundant imports and fix related code 2019-05-21 11:24:32 -05:00
UdjinM6
6f91144f22
Fix p2p-fingerprint.py 2019-05-21 11:23:37 -05:00
UdjinM6
92fed92540
Fix and re-enable pruning.py
Pruning works when starting in -litemode
2019-05-21 11:23:37 -05:00