Commit Graph

9751 Commits

Author SHA1 Message Date
UdjinM6
32ad53e77d Revert "fix masternode current rpc (#1640)" (#1681)
This reverts commit 0c1679e58c.
2017-10-17 19:40:25 +03:00
Alexander Block
2de7560b2f Update nMinimumChainWork and defaultAssumeValid to more recent values (#1680)
* Update nMinimumChainWork and defaultAssumeValid to more recent values

* Update checkpoint data of mainnet to height 750000
2017-10-12 15:05:31 +03:00
UdjinM6
cd47ac3faa fix nLastWatchdogVoteTime updates (#1679) 2017-10-12 15:05:17 +03:00
Holger Schinzel
58f9f9bbec Facelift of splash screens, adding "Digital Cash" tagline (#1674)
* Facelift of splash screens, adding "Digital Cash" tagline

* testnet: green --> orange

* revert drkblue changes
2017-10-12 15:05:00 +03:00
UdjinM6
52cd4d40d8 Fix bug: nCachedBlockHeight was not updated on start (#1673)
in submodules if no new blocks were received since previous shutdown.
This was breaking some sync logic e.g. for payment votes.
2017-10-09 21:25:24 +03:00
UdjinM6
296cfd2efa Fix compilation with qt < 5.2 (#1672)
* Fix compilation with qt < 5.2

* remove code duplication
2017-10-09 21:25:11 +03:00
thephez
ece884994e RPC help formatting updates (#1670)
- Convert satoshis to duffs
 - Correct order of fields in GetAddressUtxos
 - Add missing field from GetAddressDeltas (blockindex)
 - Add HelpExamples to gettxoutproof and verifytxoutproof
2017-10-09 21:24:56 +03:00
UdjinM6
11afd7cfd3 Translations201710 - en, de, fi, fr, ru, vi (#1659)
* fix "InstantSend: Yes/No" in receiving request dlg

* [qt] Add more sources to translate

backport fae26e8dfc

* fix .pro

* fix typo: memonic -> mnemonic

* fix "s(s)"

* `make translate` + qt linguist

* update ru

* update fi

* update de

* update fr

* update vi

* fix ru

* fix de
2017-10-09 21:24:42 +03:00
UdjinM6
0b6955a7b8 update nMinimumChainWork and defaultAssumeValid for testnet (#1668) 2017-10-05 00:01:29 +03:00
UdjinM6
33dbafbba5 fork testnet again to re-test dip0001 because of 2 bugs found in 1st attempt (#1667) 2017-10-04 23:13:32 +03:00
UdjinM6
48d63ab296 Relay govobj and govvote to every compatible peer, not only to the one with the same version (#1662) 2017-10-04 23:12:53 +03:00
UdjinM6
d286198728 fix: The idea behind fDIP0001LockedInAtTip was to indicate that it WAS locked in, not that it IS locked in (#1666) 2017-10-04 22:35:09 +03:00
Ilya Savinov
c3bc06bbf8 fix Examples section of the RPC output for listreceivedbyaccount, listreceivedbyaccount and sendfrom commands (#1665) 2017-10-04 22:34:30 +03:00
Ilya Savinov
8c1e5e8384 remove send addresses from listreceivedbyaddress output (#1664) 2017-10-04 22:34:14 +03:00
UdjinM6
381ffdc4bb Fork testnet to test 12.2 migration (#1660) 2017-10-02 00:02:01 +03:00
UdjinM6
278cf144b3 Remove cs_main from ThreadMnbRequestConnections (#1658) 2017-09-28 15:03:39 +03:00
UdjinM6
f77efcf247 do not calculate stuff that are not going to be visible in simple PS UI anyway (#1656) 2017-09-27 20:43:28 +03:00
UdjinM6
8e9289e12b Keep track of wallet UTXOs and use them for PS balances and rounds calculations (#1655)
* keep track of wallet UTXOs and use them for PS balances and rounds calculations

* fix
2017-09-27 20:43:16 +03:00
UdjinM6
0c1679e58c fix masternode current rpc (#1640)
GetNextMasternodeInQueueForPayment should not filter scheduled massternodes for it
2017-09-27 20:43:03 +03:00
UdjinM6
8c15f5f878 speedup MakeCollateralAmounts by skiping denominated inputs early (#1631) 2017-09-27 20:42:53 +03:00
Ilya Savinov
7a8910443c Fix unlocked access to vNodes.size() (#1654) 2017-09-25 17:16:56 +03:00
crowning-
08e503da28 [GUI] Change look of modaloverlay (#1653)
* [GUI] Change look of modaloverlay

* Update crownium.css

Copy'n'paste error removed
2017-09-25 17:16:48 +03:00
UdjinM6
d07ac4fbd3 fix: update DIP0001 related stuff even in IBD (#1652) 2017-09-22 04:54:14 +03:00
UdjinM6
7efa5e79d7 fix fallback fee (#1649) 2017-09-22 04:53:43 +03:00
UdjinM6
ea793a71f1 Make sure mixing masternode follows bip69 before signing final mixing tx (#1510)
* Make sure mixing tx follows bip69 before signing it

* bump MIN_PRIVATESEND_PEER_PROTO_VERSION to 70208
2017-09-22 04:53:15 +03:00
UdjinM6
502748487d bump MIN_INSTANTSEND_PROTO_VERSION to 70208 (#1650) 2017-09-22 04:52:35 +03:00
UdjinM6
72b221f745 Revert "fix BIP68 granularity and mask (#1641)" (#1647)
This reverts commit d3829e55b1.

Reverting and postponing the fix till later. Probably should write a DIP and explore different options first.
2017-09-21 16:58:23 +03:00
Ilya Savinov
b41f8d3dd6 fix instantsend-related RPC output (#1628)
* revert confirmations to its original meaning ("Blockchain Confirmations") and also remove bcconfirmations completely
* add new field instantlock (bool) to the RPC output of gettransaction, listtransactions and listsinceblock commands to indicate that tx was locked via InstantSend
* add optional `addlockconf` in addition to `minconf` parameter to all the commands where it makes sense
* fix `wallet.py` test and `vRPCConvertParams` set
* add addlockconf parameter for listreceivedbyaccount/listreceivedbyaddress commands
2017-09-20 23:34:54 +03:00
UdjinM6
25fa44d5a9 fix DIP0001 implementation (#1639)
According to DIP0001 description we should be using payment queue to select current masternode:
>As a block is mined the version number is determined by the miner who mined it and the masternode that is selected for that block.
>...
>The selection of a round consisting of 4032 blocks is made based on masternodes not being randomly selected, rather they are in a queue.

https://github.com/dashpay/dips/blob/master/dip-0001.md
2017-09-20 23:31:23 +03:00
UdjinM6
cd76f2a15c Disable HD wallet by default (#1629)
* disable hd wallet by default, fix related comments/help strings

* split tests for HD and non-HD cases
2017-09-20 23:31:12 +03:00
UdjinM6
5f0da8aa71 fix sync (#1643) 2017-09-20 23:30:56 +03:00
UdjinM6
d3829e55b1 fix BIP68 granularity and mask (#1641)
fixes https://github.com/dashpay/dash/issues/1552
2017-09-20 23:30:21 +03:00
Alexander Block
7ab175a8e3 Ensure Dash wallets < 0.12.2 can't open HD wallets (#1638) 2017-09-19 17:52:29 +03:00
diego-ab
026ad8421a Fix empty tooltip during sync under specific conditions (#1637)
* Fix empty tooltip during sync under specific conditions

* Move IsBlockchainSynced check
2017-09-19 17:52:10 +03:00
Oleg Girko
753b1e486b Eliminate remaining uses of g_connman in Dash-specific code. (#1635)
This monstrous change eliminates all remaining uses of
g_connman global variable in Dash-specific code.

Unlike previous changes eliminating g_connman use
that were isolated to particular modules, this one covers
multiple modules simultaneously because they are so interdependent
that change in one module was quickly spreading to others.

This is mostly invariant change that was done by
* changing all functions using g_connman to use connman argument,
* changing all functions calling these functions to use connman argument,
* repeating previous step until there's nothing to change.

After multiple iterations, this process converged to final result,
producing code that is mostly equivalent to original one, but passing
CConnman instance through arguments instead of global variable.

The only exception to equivalence of resulting code is that I had to
create overload of CMasternodeMan::CheckAndRemove() method without arguments
that does nothing just for use in CFlatDB<CMasternodeMan>::Dump() and
CFlatDB<CMasternodeMan>::Load() methods.
Normal CMasternodeMan::CheckAndRemove() overload now has argument of
CConnman& type and is used everywhere else.

The normal overload has this code in the beginning:

    if(!masternodeSync.IsMasternodeListSynced()) return;

Masternode list is not synced yet when we load "mncache.dat" file,
and we save "mncache.dat" file on shutdown, so I presume that it's OK
to use overload that does nothing in both cases.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-09-19 17:51:38 +03:00
UdjinM6
02e882c3d8 bump MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 and PROTOCOL_VERSION to 70208 (#1636) 2017-09-17 20:43:58 +03:00
UdjinM6
8f850c60fa Lower tx fees 10x (#1632)
* Lower tx fees 10x

* add DEFAULT_DIP0001_*FEE constants
2017-09-17 19:00:44 +03:00
UdjinM6
825b3ccc97 more "vin" -> "outpoint" in masternode rpc output (#1633)
* more "vin" -> "outpoint" in masternode rpc output

* fix doc
2017-09-17 19:00:05 +03:00
UdjinM6
e22453c902 fix fDIP0001* flags initialization (#1625) 2017-09-15 21:08:03 +03:00
UdjinM6
10eddb52de Move some (spamy) CMasternodeSync log messages to new mnsync log category (#1630) 2017-09-15 21:05:28 +03:00
Oleg Girko
4956ba7a7f Eliminate g_connman use in instantx module. (#1626)
Pass reference to CConnman instance to methods of CInstantSend
and other instantsend-related classes instead of using g_connman
global variable there.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-09-15 21:05:13 +03:00
Ilya Savinov
adc7c6cb12 Remove some recursive locks (#1624)
* unnecessary recursive lock removed in `VersionBitsTipState` method

* interface changed for CRateChecksGuard; unnecessary recursive lock removed
2017-09-15 21:05:03 +03:00
UdjinM6
d7a8489f31 Fix masternode score/rank calculations (#1620)
* fix CMasternode::CalculateScore, new mn score algo activation is triggered by DIP0001 lock-in

* unify rank calculation, base it on full mn vector rather than using active mns only

* bump CMasternodeMan::SERIALIZATION_VERSION_STRING

* unify rank calculations even further

* fix (partially revert previous one)
2017-09-14 16:58:29 +03:00
Ilya Savinov
6a6b31b74d Dip0001-related adjustments (inc. constants) (#1621)
* block size related constants adjusted; other minor fixes

* revert constants related to storing blocks on disk

* move AssertLockHeld to a separate PR
2017-09-14 14:42:37 +03:00
UdjinM6
5f4362cb82 fix SPORK_5_INSTANTSEND_MAX_VALUE validation in CWallet::CreateTransaction (#1619) 2017-09-14 14:41:58 +03:00
UdjinM6
84ecccefce InstandSend overhaul (#1592)
* InstandSend overhaul
- relay conflicting votes to detect attack earlier and PoSe-ban attacking masternode(s)
- cancel conflicting completed locks
- do not overwrite mempool or reprocess blocks
- 15 sec timeout/window to lock tx

* check nValueIn for SPORK_5_INSTANTSEND_MAX_VALUE (instead of nValueOut)

* relay valid vote asap

* ignore votes for spent coins, consider them invalid
2017-09-14 14:41:40 +03:00
krychlicki
6ff7b7aa54 fix TrafficGraphData bandwidth calculation (#1618)
* recalculate average bandwidth for given range

* tests for bandwidth calculation
2017-09-12 17:33:48 +03:00
UdjinM6
33e460f306 Fix losing keys on PrivateSend (#1616)
* reserve colateral keey only if needed

reserve colateral keey only if needed -> fix losing one key on every
subsequent CreateDonominate

* Adding KeyHolder and KeyHolderStorage

Adding KeyHolder and KeyHolderStorage to store keys used in PrivateSend
until status of mixing is known.

* Removing ClearOn... methods. Instead of calling directly KeepAll/ReplaceAll.

* remove usage of shared_ptr

* use unique_ptr

* follow naming convention

* use CKeyHolderStorage in CreateDenominated too

* adjust log messages

* return keys on POOL_STATE_ERROR, keep keys on POOL_STATE_SUCCESS

* Disable copy/assign and allow move

* Use keyHolderStorageDenom for collateral output in CreateDenominated
2017-09-11 17:14:55 +03:00
UdjinM6
05da4557d0 Refactor masternode management (#1611)
* Store masternodes in a map instead of a vector, drop unused functions in CMasternodeMan

* CTxIn vin -> COutPoint outpoint

* do not use CMasternodeMan::Find outside of the class

* update GetMasternodeInfo

* safe version of GetNextMasternodeInQueueForPayment

* fix ProcessMasternodeConnections

* bump CMasternodeMan::SERIALIZATION_VERSION_STRING
2017-09-11 17:13:48 +03:00
UdjinM6
cd262bf641 DIP0001 implementation (#1594)
* DIP0001 implementation

* add option in ComputeBlockVersion to assume that masternode is upgraded (and skip rank calculation)

* fix mainnet DIP0001 nTimeout

* schedule DIP0001 testnet activation start for Sep 18th, 2017 (bump timeout too)
2017-09-11 17:13:30 +03:00
Alexander Block
91d99fcd3f Backport Bitcoin Qt/Gui changes up to 0.14.x part 3 (#1617)
* Merge #8996: Network activity toggle

19f46f1 Qt: New network_disabled icon (Luke Dashjr)
54cf997 RPC/Net: Use boolean consistently for networkactive, and remove from getinfo (Luke Dashjr)
b2b33d9 Overhaul network activity toggle (Jonas Schnelli)
32efa79 Qt: Add GUI feedback and control of network activity state. (Jon Lund Steffensen)
e38993b RPC: Add "togglenetwork" method to toggle network activity temporarily (Jon Lund Steffensen)
7c9a98a Allow network activity to be temporarily suspended. (Jon Lund Steffensen)

* Revert on-click behavior of network status icon to showing peers list

Stay with the way Dash handled clicking on the status icon

* Add theme support for network disabled icon

* Merge #8874: Multiple Selection for peer and ban tables

1077577 Fix auto-deselection of peers (Andrew Chow)
addfdeb Multiple Selection for peer and ban tables (Andrew Chow)

* Merge #9190: qt: Plug many memory leaks

ed998ea qt: Avoid OpenSSL certstore-related memory leak (Wladimir J. van der Laan)
5204598 qt: Avoid shutdownwindow-related memory leak (Wladimir J. van der Laan)
e4f126a qt: Avoid splash-screen related memory leak (Wladimir J. van der Laan)
693384e qt: Prevent thread/memory leak on exiting RPCConsole (Wladimir J. van der Laan)
47db075 qt: Plug many memory leaks (Wladimir J. van der Laan)

* 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)

* Merge #9266: Bugfix: Qt/RPCConsole: Put column enum in the right places

df17fe0 Bugfix: Qt/RPCConsole: Put column enum in the right places (Luke Dashjr)

* Merge #9255: qt: layoutAboutToChange signal is called layoutAboutToBeChanged

f36349e qt: Remove on_toggleNetworkActiveButton_clicked from RPCConsole (Wladimir J. van der Laan)
297cc20 qt: layoutAboutToChange signal is called layoutAboutToBeChanged (Wladimir J. van der Laan)

* Use UniValue until bitcoin PR #8788 is backported

Network active toggle was already based on
"[RPC] Give RPC commands more information about the RPC request"
We need to use the old UniValue style until that one is backported

* Merge #8906: [qt] sync-overlay: Don't show progress twice

fafeec3 [qt] sync-overlay: Don't show progress twice (MarcoFalke)

* Merge #8985: Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip()

3154d6e [Qt] use NotifyHeaderTip's height and date for the progress update (Jonas Schnelli)
0a261b6 Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip() (Jonas Schnelli)

* Merge #9280: [Qt] Show ModalOverlay by pressing the progress bar, allow hiding

89a3723 [Qt] Show ModalOverlay by pressing the progress bar, disabled show() in sync mode (Jonas Schnelli)

* Merge #9461: [Qt] Improve progress display during headers-sync and peer-finding

40ec7c7 [Qt] Improve progress display during headers-sync and peer-finding (Jonas Schnelli)

* Merge #9588: qt: Use nPowTargetSpacing constant

fa4d478 qt: Use nPowTargetSpacing constant (MarcoFalke)

* Hide modal overlay forever when syncing has catched up

Don't allow to open it again by clicking on the progress bar and spinner
icon. Currently the overlay does not show meaningful information about
masternode sync and it gives the impression of being stuck after the block
chain sync is done.

* Don't include chainparams.h in sendcoinsdialog.cpp

This was just a remainder of a backported PR which meant to change some
calculation in this file which does not apply to Dash.

* Also check for fNetworkActive in ConnectNode

* Merge #9528: [qt] Rename formateNiceTimeOffset(qint64) to formatNiceTimeOffset(qint64)

988d300 [qt] Rename formateNiceTimeOffset(qint64) to formatNiceTimeOffset(qint64) (practicalswift)

* Merge #11237: qt: Fixing division by zero in time remaining

c8d38abd6 Refactor tipUpdate as per style guide (MeshCollider)
3b69a08c5 Fix division by zero in time remaining (MeshCollider)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/10291, https://github.com/bitcoin/bitcoin/issues/11265

  progressDelta may be 0 (or even negative according to 11265), this checks for that and prints unknown if it is, because we cannot calculate an estimate for the time remaining (would be infinite or negative).

Tree-SHA512: bc5708e5ed6e4670d008219558c5fbb25709bd99a32c98ec39bb74f94a0b7fa058f3d03389ccdd39e6723e6b5b48e34b13ceee7c051c2db631e51d8ec3e1d68c
2017-09-11 16:38:14 +03:00
Alexander Block
9707ca5cea Backport Bitcoin Qt/Gui changes up to 0.14.x part 2 (#1615)
* Merge #7506: Use CCoinControl selection in CWallet::FundTransaction

d6cc6a1 Use CCoinControl selection in CWallet::FundTransaction (João Barbosa)

* Merge #7732: [Qt] Debug window: replace "Build date" with "Datadir"

fc737d1 [Qt] remove unused formatBuildDate method (Jonas Schnelli)
4856f1d [Qt] Debug window: replace "Build date" with "Datadir" (Jonas Schnelli)

* Merge #7707: [RPC][QT] UI support for abandoned transactions

8efed3b [Qt] Support for abandoned/abandoning transactions (Jonas Schnelli)

* Merge #7688: List solvability in listunspent output and improve help

c3932b3 List solvability in listunspent output and improve help (Pieter Wuille)

* Merge #8006: Qt: Add option to disable the system tray icon

8b0e497 Qt: Add option to hide the system tray icon (Tyler Hardin)

* Merge #8073: qt: askpassphrasedialog: Clear pass fields on accept

02ce2a3 qt: askpassphrasedialog: Clear pass fields on accept (Pavel Vasin)

* Merge #8231: [Qt] fix a bug where the SplashScreen will not be hidden during startup

b3e1348 [Qt] fix a bug where the SplashScreen will not be hidden during startup (Jonas Schnelli)

* Merge #8257: Do not ask a UI question from bitcoind

1acf1db Do not ask a UI question from bitcoind (Pieter Wuille)

* Merge #8463: [qt] Remove Priority from coincontrol dialog

fa8dd78 [qt] Remove Priority from coincontrol dialog (MarcoFalke)

* Merge #8678: [Qt][CoinControl] fix UI bug that could result in paying unexpected fee

0480293 [Qt][CoinControl] fix UI bug that could result in paying unexpected fee (Jonas Schnelli)

* Merge #8672: Qt: Show transaction size in transaction details window

c015634 qt: Adding transaction size to transaction details window (Hampus Sjöberg)
 \-- merge fix for s/size/total size/
fdf82fb Adding method GetTotalSize() to CTransaction (Hampus Sjöberg)

* Merge #8371: [Qt] Add out-of-sync modal info layer

08827df [Qt] modalinfolayer: removed unused comments, renamed signal, code style overhaul (Jonas Schnelli)
d8b062e [Qt] only update "amount of blocks left" when the header chain is in-sync (Jonas Schnelli)
e3245b4 [Qt] add out-of-sync modal info layer (Jonas Schnelli)
e47052f [Qt] ClientModel add method to get the height of the header chain (Jonas Schnelli)
a001f18 [Qt] Always pass the numBlocksChanged signal for headers tip changed (Jonas Schnelli)
bd44a04 [Qt] make Out-Of-Sync warning icon clickable (Jonas Schnelli)
0904c3c [Refactor] refactor function that forms human readable text out of a timeoffset (Jonas Schnelli)

* Merge #8805: Trivial: Grammar and capitalization

c9ce17b Trivial: Grammar and capitalization (Derek Miller)

* Merge #8885: gui: fix ban from qt console

cb78c60 gui: fix ban from qt console (Cory Fields)

* Merge #8821: [qt] sync-overlay: Don't block during reindex

fa85e86 [qt] sync-overlay: Don't show estimated number of headers left (MarcoFalke)
faa4de2 [qt] sync-overlay: Don't block during reindex (MarcoFalke)

* Support themes for new transaction_abandoned icon

* Fix constructor call to COutput

* Merge #7842: RPC: do not print minping time in getpeerinfo when no ping received yet

62a6486 RPC: do not print ping info in getpeerinfo when no ping received yet, fix help (Pavel Janík)

* Merge #8918: Qt: Add "Copy URI" to payment request context menu

21f5a63 Qt: Add "Copy URI" to payment request context menu (Luke Dashjr)

* Merge #8925: qt: Display minimum ping in debug window.

1724a40 Display minimum ping in debug window. (R E Broadley)

* Merge #8972: [Qt] make warnings label selectable (jonasschnelli)

ef0c9ee [Qt] make warnings label selectable (Jonas Schnelli)

* Make background of warning icon transparent in modaloverlay

* Merge #9088: Reduce ambiguity of warning message

77cbbd9 Make warning message about wallet balance possibly being incorrect less ambiguous. (R E Broadley)

* Replace Bitcoin with Dash in modal overlay

* Remove clicked signals from labelWalletStatus and labelTransactionsStatus

As both are really just labels, clicking on those is not possible.
This is different in Bitcoin, where these labels are actually buttons.

* Pull out modaloverlay show/hide into it's own if/else block and switch to time based check

Also don't use masternodeSync.IsBlockchainSynced() for now as it won't
report the blockchain being synced before the first block (or other MN
data?) arrives. This would otherwise give the impression that sync is
being stuck.
2017-09-09 10:04:02 +03:00
Alexander Block
690cb58f80 Backport Bitcoin Qt/Gui changes up to 0.14.x part 1 (#1614)
* Merge pull request #7154

a3c3ddb [Qt] add InMempool() info to transaction details (Jonas Schnelli)

* Merge pull request #7218

fa5769e [qt] Fix misleading translation (MarcoFalke)
fa8c8d7 torcontrol debug: Change to a blanket message that covers both cases (MarcoFalke)

* Merge pull request #7255

6fd0a07 Remove hardcoded fee from CoinControl ToolTip (fanquake)
5fdf32d Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake)

* Merge pull request #7263

a5a0831 Double semicolon cleanup. (21E14)

* Merge pull request #7334

fa989fb [qt] coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke)

* Merge pull request #7329

9d263bd Typo fixes in comments (Chris Wheeler)

* Merge #7396: [Qt] Add option to increase/decrease font size in the console window

43abb02 [Qt] Add a new chevron/arrow icon for the console prompt line (Jonas Schnelli)
56c9e66 [Qt] keep scroll position in GUI console after changing font size (Jonas Schnelli)
3a3a927 [Qt] Add option to increase/decrease font size in the console window (Jonas Schnelli)

* Merge #7628: QT: Add 'copy full transaction details' option

b51ed40 QT: Add 'copy full transaction details' option (Eric Shaw)

* Merge #7668: Fix history deletion bug after font size change

21e45a0 Fix history deletion bug after font change (Andrew C)

* Copy/Move font size related icons into theme folders

* Use formatTxDate for date/time in TxPlainTextRole
2017-09-07 18:59:00 +03:00
Oleg Girko
8da26da713 Eliminate g_connman use in spork module. (#1613)
Pass reference to CConnman instance to methods of CSporkManager and
CSporkMessage instead of using g_connman global variable.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-09-07 18:58:38 +03:00
Oleg Girko
91ae0b712a Use connman passed to ThreadSendAlert() instead of g_connman global. (#1610)
There is no reason to use g_connman global variable in ThreadSendAlert()
because reference to CConnman instance is already passed to it as argument.

This was overlooked when refactoring sendalert module, it's time to fix it.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-09-05 13:53:28 +03:00
Alexander Block
169afafd50 Fix duplicate headers download in initial sync (#1589)
* Fix duplicate headers download in initial sync

Now that initial block download is delayed until the headers sync is done,
it was noticed that the initial headers sync may happen multiple times in
parallel in the case new blocks are announced. This happens because for
every block in INV that is received, a getheaders message is immediately
sent out resulting in a full download of the headers chain starting from
the point of where the initial headers sync is currently at. This happens
once for each peer that announces the new block. This slows down the
initial headers sync and increases the chance of another block being
announced before it is finished, probably leading to the same behavior
as already described, slowing down the sync even more...and so on.

This commit delays sending of GETHEADERS to later in case the chain is too
far behind while a new block gets announced. Header chains will still be
downloaded multiple times, but the downloading will start much closer
to the tip of the chain, so the damage is not that bad anymore.

This ensures that we get all headers from all peers, even if any of them
is on another chain. This should avoid what happened in
https://github.com/bitcoin/bitcoin/pull/8054
which needed to be reverted later.

This fixes the Bitcoin issue https://github.com/bitcoin/bitcoin/issues/6755

* Introduce DelayGetHeadersTime chain param and fix tests

The delaying of GETHEADERS in combination with very old block times in
test cases resulted in the delaying being triggered when the first newly
mined block arrives. This results in a completely stalled sync.

This is fixed by avoiding delaying in when running tests.

* Disconnect peers which are not catched up

Peers which stop sending us headers too early are very likely peers which
did not catch up before and stalled for some reason. We should disconnect
these peers and chose another one to continue.
2017-09-04 09:10:52 +03:00
UdjinM6
6496fc9dad fix off-by-1 in CSuperblock::GetPaymentsLimit (#1598) 2017-09-03 16:31:14 +03:00
UdjinM6
82595b1b91 fix number of blocks to wait after successful mixing tx (#1597) 2017-09-03 16:30:58 +03:00
UdjinM6
4f0618ae8a Fix sync issues (#1599)
- add `MASTERNODE_SYNC_WAITING` sync state/asset and initial timeout
- wait for block headers to be downloaded (new signal `AcceptedBlockHeader`)
- wait for blocks to reach best headers tip before switching to masternode list sync (new signal `NotifyHeaderTip`)
- switched sync from `UpdatedBlockTip` to a combination of `AcceptedBlockHeader` and `NotifyHeaderTip`
- all blockchain-related bumps should take place only while we are still syncing blockchain, should be no such bumps after that
2017-09-03 16:30:08 +03:00
Oleg Girko
b82b9787d2 Backport Bitcoin PR#8128: Net: Turn net structures into dumb storage classes (#1604)
* net: Split resolving out of CNetAddr

* net: Split resolving out of CService

* net: Split resolving out of CSubNet

* net: move CNetAddr/CService/CSubNet out of netbase

* net: narrow include scope after moving to netaddress

Net functionality is no longer needed for CAddress/CAddrman/etc. now that
CNetAddr/CService/CSubNet are dumb storage classes.

* net: Add direct tests for new CSubNet constructors

* net: Have LookupNumeric return a CService directly

Also fix up a few small issues:
- Lookup with "badip:port" now sets the port to 0
- Don't allow assert to have side-effects

* net: fixup nits
2017-09-03 16:29:10 +03:00
Gavin Westwood
b22cda4df0 typo: "Writting" -> "Writing" (#1605)
Correct 'Writting' to 'Writing' in log file messages.
2017-09-03 16:28:53 +03:00
Oleg Girko
b41d9eac22 Backport Bitcoin PR#7868: net: Split DNS resolving functionality out of net structures (#1601)
* net: require lookup functions to specify all arguments

To make it clear where DNS resolves are happening

* net: manually resolve dns seed sources

Note: Some seeds aren't actually returning an IP for their name entries, so
they're being added to addrman with a source of [::].

This commit shouldn't change that behavior, for better or worse.

* net: resolve outside of storage structures

Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require
that addresses are already resolved.

This greatly simplifies async resolve logic, and makes it harder to
accidentally leak DNS queries.

* net: disable resolving from storage structures

CNetAddr/CService/CSubnet can no longer resolve DNS.
2017-09-02 23:07:11 +03:00
Oleg Girko
589d22f2ca net: No longer send local address in addrMe (#1600)
After #8594 the addrFrom sent by a node is not used anymore at all,
so don't bother sending it.

Also mitigates the privacy issue in (#8616). It doesn't completely solve
the issue as GetLocalAddress is also called in AdvertiseLocal, but at
least when advertising addresses it stands out less as *our* address.
2017-09-01 06:12:23 +03:00
UdjinM6
9028a22b88 safe version of GetMasternodeByRank (#1595)
* safe version of GetMasternodeByRank

* fix
2017-08-31 18:58:23 +03:00
Oleg Girko
76181f5757 Do not add random inbound peers to addrman. (#1593)
We should learn about new peers via address messages.

An inbound peer connecting to us tells us nothing about
 its ability to accept incoming connections from us, so
 we shouldn't assume that we can connect to it based on
 this.

The vast majority of nodes on the network do not accept
 incoming connections, adding them will only slow down
 the process of making a successful connection in the
 future.

Nodes which have configured themselves to not announce would prefer we
 not violate their privacy by announcing them in GETADDR responses.
2017-08-31 18:34:24 +03:00
Oleg Girko
105122181a Partially backport Bitcoin PR#9626: Clean up a few CConnman cs_vNodes/CNode things (#1591)
* Delete some unused (and broken) functions in CConnman

* Ensure cs_vNodes is held when using the return value from FindNode
2017-08-29 02:51:56 +03:00
UdjinM6
4f5455000e Use GetAdjustedTime instead of GetTime when dealing with network-wide timestamps (#1590) 2017-08-29 02:51:44 +03:00
UdjinM6
b5f7be6498 slightly refactor CDSNotificationInterface (#1581) 2017-08-29 02:51:33 +03:00
UdjinM6
8012f2ca7f drop masternode index (#1580) 2017-08-25 15:57:19 +03:00
UdjinM6
fe81d641da drop pCurrentBlockIndex and use cached block height instead (nCachedBlockHeight) (#1579) 2017-08-25 15:57:05 +03:00
UdjinM6
23582aea45 add/use GetUTXO[Coins/Confirmations] helpers instead of GetInputAge[IX] (#1578)
(also move IS confirmations calculation helper to CInstantSend)
2017-08-25 15:56:48 +03:00
Oleg Girko
c56ba56e79 net: Consistently use GetTimeMicros() for inactivity checks (#1588)
The use of mocktime in test logic means that comparisons between
GetTime() and GetTimeMicros()/1000000 are unreliable since the former
can use mocktime values while the latter always gets the system clock;
this changes the networking code's inactivity checks to consistently
use the system clock for inactivity comparisons.

Also remove some hacks from setmocktime() that are no longer needed,
now that we're using the system clock for nLastSend and nLastRecv.
2017-08-24 02:38:29 +03:00
UdjinM6
510c0a06d7 Relay tx in sendrawtransaction according to its inv.type (#1584)
bug was introduced in #1537 a9d771e497 (diff-01aa7d1d32f1b9e5a836c9c411978918R889)
2017-08-23 17:26:57 +03:00
Ilya Savinov
4ed838cb5d Fix MasternodeRateCheck (#1490)
* fixed an issue with MasternodeRateCheck always returns true

* additioanal fixes and refactoring (rebase)

* slightly improved CRateBuffer synchronization for newly started nodes
2017-08-23 17:22:23 +03:00
Alex Werner
ae909d0a09 Fix : Reject invalid instantsend transaction (#1583) 2017-08-23 17:21:54 +03:00
UdjinM6
f786ce6aba fix instantsendtoaddress param convertion (#1585)
`subtractfeefromamount` is bool but `true`/`false` are not recognized in rpc atm. This should fix it.
2017-08-23 17:21:33 +03:00
Alexander Block
ccee103a0e Backport "assumed valid blocks" feature from Bitcoin 0.13 (#1582)
* IBD check uses minimumchain work instead of checkpoints.

This introduces a 'minimum chain work' chainparam which is intended
 to be the known amount of work in the chain for the network at the
 time of software release.  If you don't have this much work, you're
 not yet caught up.

This is used instead of the count of blocks test from checkpoints.

This criteria is trivial to keep updated as there is no element of
subjectivity, trust, or position dependence to it. It is also a more
reliable metric of sync status than a block count.

* Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.

GetTotalBlocksEstimate is no longer used and it was the only thing
 the checkpoint tests were testing.

Since checkpoints are on their way out it makes more sense to remove
 the test file than to cook up a new pointless test.

# Conflicts:
#	src/Makefile.test.include
#	src/test/Checkpoints_tests.cpp

* IsInitialBlockDownload no longer uses header-only timestamps.

This avoids a corner case (mostly visible on testnet) where bogus
 headers can keep nodes in IsInitialBlockDownload.

* Delay parallel block download until chain has sufficient work

nMinimumChainWork is an anti-DoS threshold; wait until we have a proposed
tip with more work than that before downloading blocks towards that tip.

* Add timeout for headers sync

At startup, we choose one peer to serve us the headers chain, until
our best header is close to caught up.  Disconnect this peer if more
than 15 minutes + 1ms/expected_header passes and our best header
is still more than 1 day away from current time.

* Introduce assumevalid setting to skip presumed valid scripts.

This disentangles the script validation skipping from checkpoints.

A new option is introduced "assumevalid" which specifies a block whos
 ancestors we assume all have valid scriptsigs and so we do not check
 them when they are also burried under the best header by two weeks
 worth of work.

Unlike checkpoints this has no influence on consensus unless you set
 it to a block with an invalid history.  Because of this it can be
 easily be updated without risk of influencing the network consensus.

This results in a massive IBD speedup.

This approach was independently recommended by Peter Todd and Luke-Jr
 since POW based signature skipping (see PR#9180) does not have the
 verifiable properties of a specific hash and may create bad incentives.

The downside is that, like checkpoints, the defaults bitrot and older
 releases will sync slower.  On the plus side users can provide their
 own value here, and if they set it to something crazy all that will
 happen is more time will be spend validating signatures.

Checkblocks and checklevel are also moved to the hidden debug options:
 Especially now that checkblocks has a low default there is little need
 to change these settings, and users frequently misunderstand them as
 influencing security or IBD speed.  By hiding them we offset the
 space added by this new option.

* Add consensusParams to FindNextBlocksToDownload

* Adjust check in headers timeout logic to align with 144 blocks in Dash
2017-08-23 17:21:08 +03:00
Oleg Girko
2472999da0 Backport Bitcoin PR#9441: Net: Massive speedup. Net locks overhaul (#1586)
* net: fix typo causing the wrong receive buffer size

Surprisingly this hasn't been causing me any issues while testing, probably
because it requires lots of large blocks to be flying around.

Send/Recv corks need tests!

* net: make vRecvMsg a list so that we can use splice()

* net: make GetReceiveFloodSize public

This will be needed so that the message processor can cork incoming messages

* net: only disconnect if fDisconnect has been set

These conditions are problematic to check without locking, and we shouldn't be
relying on the refcount to disconnect.

* net: wait until the node is destroyed to delete its recv buffer

when vRecvMsg becomes a private buffer, it won't make sense to allow other
threads to mess with it anymore.

* net: set message deserialization version when it's actually time to deserialize

We'll soon no longer have access to vRecvMsg, and this is more intuitive anyway.

* net: handle message accounting in ReceiveMsgBytes

This allows locking to be pushed down to only where it's needed

Also reuse the current time rather than checking multiple times.

* net: record bytes written before notifying the message processor

* net: Add a simple function for waking the message handler

This may be used publicly in the future

* net: remove useless comments

* net: remove redundant max sendbuffer size check

This is left-over from before there was proper accounting. Hitting 2x the
sendbuffer size should not be possible.

* net: rework the way that the messagehandler sleeps

In order to sleep accurately, the message handler needs to know if _any_ node
has more processing that it should do before the entire thread sleeps.

Rather than returning a value that represents whether ProcessMessages
encountered a message that should trigger a disconnnect, interpret the return
value as whether or not that node has more work to do.

Also, use a global fProcessWake value that can be set by other threads,
which takes precedence (for one cycle) over the messagehandler's decision.

Note that the previous behavior was to only process one message per loop
(except in the case of a bad checksum or invalid header). That was changed in
PR #3180.

The only change here in that regard is that the current node now falls to the
back of the processing queue for the bad checksum/invalid header cases.

* net: add a new message queue for the message processor

This separates the storage of messages from the net and queued messages for
processing, allowing the locks to be split.

* net: add a flag to indicate when a node's process queue is full

Messages are dumped very quickly from the socket handler to the processor, so
it's the depth of the processing queue that's interesting.

The socket handler checks the process queue's size during the brief message
hand-off and pauses if necessary, and the processor possibly unpauses each time
a message is popped off of its queue.

* net: add a flag to indicate when a node's send buffer is full

Similar to the recv flag, but this one indicates whether or not the net's send
buffer is full.

The socket handler checks the send queue when a new message is added and pauses
if necessary, and possibly unpauses after each message is drained from its buffer.

* net: remove cs_vRecvMsg

vRecvMsg is now only touched by the socket handler thread.

The accounting vars (nRecvBytes/nLastRecv/mapRecvBytesPerMsgCmd) are also
only used by the socket handler thread, with the exception of queries from
rpc/gui. These accesses are not threadsafe, but they never were. This needs to
be addressed separately.

Also, update comment describing data flow
2017-08-23 17:20:43 +03:00
Oleg Girko
b9c67258ba Backport Bitcoin PR#9609: net: fix remaining net assertions (#1575) + Dashify
* Dont deserialize nVersion into CNode, should fix #9212

* net: deserialize the entire version message locally

This avoids having some vars set if the version negotiation fails.

Also copy it all into CNode at the same site. nVersion and
fSuccessfullyConnected are set last, as they are the gates for the other vars.
Make them atomic for that reason.

* net: don't run callbacks on nodes that haven't completed the version handshake

Since ForEach* are can be used to send messages to  all nodes, the caller may
end up sending a message before the version handshake is complete. To limit
this, filter out these nodes. While we're at it, may as well filter out
disconnected nodes as well.

Delete unused methods rather than updating them.

* net: Disallow sending messages until the version handshake is complete

This is a change in behavior, though it's much more sane now than before.

* net: log an error rather than asserting if send version is misused

Also cleaned up the comments and moved from the header to the .cpp so that
logging headers aren't needed from net.h

* Implement conditions for ForEachNode() and ForNode() methods of CConnman.

A change making ForEachNode() and ForNode() methods ignore nodes that
have not completed initial handshake have been backported from Bitcoin.
Unfortunately, some Dash-specific code needs to iterate over all nodes.

This change introduces additional condition argument to these methods.
This argument is a functional object that should return true for nodes
that should be taken into account, not ignored.

Two functional objects are provided in CConnman namespace:
* FullyConnectedOnly returns true for nodes that have handshake completed,
* AllNodes returns true for all nodes.

Overloads for ForEachNode() and ForNode() methods without condition argument
are left for compatibility with non-Dash-specific code.
They use FullyConnectedOnly functional object for condition.

Signed-off-by: Oleg Girko <ol@infoserver.lv>

* Iterate over all nodes in Dash-specific code using AllNodes condition.

Use AllNodes functional object as newly introduced condition argument for
ForEachNode() and ForNode() methods of CConnman to iterate over all nodes
where needed in Dash-specific code.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-08-17 21:37:22 +03:00
Will Wray
8b5f47e686 Masternode classes: Remove repeated/un-needed code and data (#1572)
* Remove un-needed #includes (what is the policy?)

Data was duplicated in masternode_info_t and CMasternode classes:

* CMasternode is changed to inherit from masternode_info_t
  so the data members are inherited rather than repeated
 (also inherits unrepeated nTimeLastPing and fInfoValid members;
  this slight intrusiveness made up for in simplicity).

* Use in-class member initializers (C++11) for defaults,
  so only non-default initializers are required in the lists.
  Allows to shorten repetitous constructor initializer lists.
  This makes checking for uninitialized data simpler.

* Default constructors are defined as "= default;" if possible.

* masternode_info_t is changed to behave like an aggregate
 (but requires over-complicated constructors until c++14).
  There are pros and cons here - aggregate initialization
  is convenient but implicit).

* Removed user-defined swap functions.
  They appear to only be used in operator= definitions,
  using the copy-in,swap-and-return idiom:

* Default operator=, where possible.

* Move in class `friend bool operator==` out-of-class.
2017-08-11 21:52:06 +03:00
Ilya Savinov
4a9fbca080 Fix potential deadlock in CInstantSend::UpdateLockedTransaction (#1571)
* cs_wallet -> cs_instantsend:

getinfo(...) - LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL)
  CAmount CWallet::GetBalance() const - LOCK2(cs_main, cs_wallet)
    CWalletTx::IsTrusted()
      GetDepthInMainChain()
        CInstantSend::IsLockedInstantSendTransaction(...) - LOCK(cs_instantsend)

cs_wallet -> cs_instantsend:

CWallet::ReacceptWalletTransactions() - LOCK2(cs_main, cs_wallet)
  GetDepthInMainChain()
    CInstantSend::IsLockedInstantSendTransaction(...) - LOCK(cs_instantsend)

cs_instantsend -> cs_wallet:

void CInstantSend::UpdateLockedTransaction(...) - LOCK(cs_instantsend)
  CWallet::UpdatedTransaction(...) - LOCK(cs_wallet)

* AssertLockHeld added
2017-08-11 21:51:44 +03:00
chaeplin
0fc13434b4 limit UpdatedBlockTip in IBD (#1570) 2017-08-11 21:51:24 +03:00
UdjinM6
c608bbec1d Pass reference when calling HasPayeeWithVotes (#1569) 2017-08-11 21:50:57 +03:00
UdjinM6
105713c10a Sync overhaul (#1564)
* Change sync process:
- IsBlockchainSynced(): drop CheckNodeHeight() and all complicated code, use fInitialDownload in UpdatedBlockTip() to switch initial states
- ProcessTick(): detect sleep mode like it was in IsBlockchainSynced(), not by number of masternodes

* Changes for sync in governance:
- do not keep sync alive on ConfirmInventoryRequest()
- skip some governance actions until we are synced to some level

* do not run CMasternodeMan::UpdateLastPaid() until winners list is synced

* start syncing mn list on the same node right after requesting sporks

* replace nTimeLast<Asset> with the unified nTimeLastBumped, bump on UpdatedBlockTip

* fix comments and LogPrintf-s

* remove excessive MASTERNODE_SYNC_IBD

* a bit more descriptive BumpAssetLastTime in few cases
2017-08-09 19:07:03 +03:00
Oleg Girko
42c784dc7a Backport Bitcoin PR#9289: net: drop boost::thread_group (#1568)
* net: a few small cleanups before replacing boost threads

- Drop the interruption point directly after the pnode allocation. This would
    be leaky if hit.
- Rearrange thread creation so that the socket handler comes first

* net: add CThreadInterrupt and InterruptibleSleep

* net: make net interruptible

Also now that net threads are interruptible, switch them to use std
threads/binds/mutexes/condvars.

* net: make net processing interruptible

* net: remove thread_interrupted catch

This is now a std::thread, so there's no hope of catching a boost interruption
point.

* net: make proxy receives interruptible

* net: misc header cleanups
2017-08-09 19:06:31 +03:00
Oleg Girko
df6d458b85 Backport Bitcoin PR#9260: Mrs Peacock in The Library with The Candlestick (killed main.{h,cpp}) (#1566)
* Remove orphan state wipe from UnloadBlockIndex.

As orphan state is now "network state", like in
d6ea737be1,

UnloadBlockIndex is only used during init if we end up reindexing
to clear our block state so that we can start over. However, at
that time no connections have been brought up as CConnman hasn't
been started yet, so all of the network processing state logic is
empty when its called.

* Move network-msg-processing code out of main to its own file

* Rename the remaining main.{h,cpp} to validation.{h,cpp}
2017-08-09 03:19:06 +03:00
Oleg Girko
bcf5455bfd Backport Bitcoin PR#8822: net: Consistent checksum handling (#1565)
* net: Consistent checksum handling

In principle, the checksums of P2P packets are simply 4-byte blobs which
are the first four bytes of SHA256(SHA256(payload)).

Currently they are handled as little-endian 32-bit integers half of the
time, as blobs the other half, sometimes copying the one to the other,
resulting in somewhat confused code.

This PR changes the handling to be consistent both at packet creation
and receiving, making it (I think) easier to understand.

* net: Hardcode protocol sizes and use fixed-size types

The P2P network uses a fixed protocol, these sizes shouldn't change
based on what happens to be the architecture.
2017-08-08 20:57:36 +03:00
UdjinM6
87707c0127 fix CDSNotificationInterface::UpdatedBlockTip signature (#1562)
to match the one in CValidationInterface
2017-08-04 20:43:48 +03:00
Oleg Girko
415085c732 Backport Bitcoin PR#9183: Final Preparation for main.cpp Split (#1561)
* Expose AcceptBlockHeader through main.h

* Split ::HEADERS processing into two separate cs_main locks

This will allow NotifyHeaderTip to be called from an
AcceptBlockHeader wrapper function without holding cs_main.

* Use exposed ProcessNewBlockHeaders from ProcessMessages
2017-08-03 01:19:34 +03:00
Oleg Girko
b4b3431458 Backport Bitcoin PR#9075: Decouple peer-processing-logic from block-connection-logic (#3) (#1560)
* Remove pfrom parameter from ProcessNewBlock

This further decouples ProcessNewBlock from networking/peer logic.

* Replace CValidationState param in ProcessNewBlock with BlockChecked
2017-08-02 21:35:04 +03:00
Oleg Girko
e7e106e228 Backport Bitcoin PR#8969: Decouple peer-processing-logic from block-connection-logic (#2) (#1558)
* Move MarkBlockAsReceived out of ProcessNewMessage

* Remove network state wipe from UnloadBlockIndex.

UnloadBlockIndex is only used during init if we end up reindexing
to clear our block state so that we can start over. However, at
that time no connections have been brought up as CConnman hasn't
been started yet, so all of the network processing state logic is
empty when its called.

Additionally, the initialization of the recentRejects set is moved
to InitPeerLogic.

* Move all calls to CheckBlockIndex out of net-processing logic

This will result in many more calls to CheckBlockIndex when
connecting a list of headers (eg in ::HEADERS messages processing)
but its only enabled in debug mode, and that should mostly just be
during IBD, so it should be OK.

* Move FlushStateToDisk call out of ProcessMessages::TX into ATMP

* Move nTimeBestReceived updating into net processing code
2017-08-01 18:11:32 +03:00
Oleg Girko
a3c8cb20df Backport Bitcoin PR#8865: Decouple peer-processing-logic from block-connection-logic (#1556)
* Make validationinterface.UpdatedBlockTip more verbose

In anticipation of making all the callbacks out of block processing
flow through it. Note that vHashes will always have something in it
since pindexFork != pindexNewTip.

* Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())

* Remove CConnman parameter from ProcessNewBlock/ActivateBestChain

* Remove SyncWithWallets wrapper function

* Move net-processing logic definitions together in main.h

* Use CValidationInterface from chain logic to notify peer logic

This adds a new CValidationInterface subclass, defined in main.h,
to receive notifications of UpdatedBlockTip and use that to push
blocks to peers, instead of doing it directly from
ActivateBestChain.

* Always call UpdatedBlockTip, even if blocks were only disconnected

* Use BlockChecked signal to send reject messages from mapBlockSource
2017-07-28 17:10:10 +03:00
Oleg Girko
cc4db34f4d net: only delete CConnman if it's been created (#1555)
In the case of (for example) an already-running bitcoind, the shutdown sequence
begins before CConnman has been created, leading to a null-pointer dereference
when g_connman->Stop() is called.

Instead, Just let the CConnman dtor take care of stopping.
2017-07-28 01:39:53 +03:00
Oleg Girko
b621cfb5fb Backport Bitcoin PR#8708: net: have CConnman handle message sending (#1553)
* serialization: teach serializers variadics

Also add a variadic CDataStream ctor for ease-of-use.

* connman is in charge of pushing messages

The changes here are dense and subtle, but hopefully all is more explicit
than before.

- CConnman is now in charge of sending data rather than the nodes themselves.
  This is necessary because many decisions need to be made with all nodes in
  mind, and a model that requires the nodes calling up to their manager quickly
  turns to spaghetti.

- The per-node-serializer (ssSend) has been replaced with a (quasi-)const
  send-version. Since the send version for serialization can only change once
  per connection, we now explicitly tag messages with INIT_PROTO_VERSION if
  they are sent before the handshake. With this done, there's no need to lock
  for access to nSendVersion.

  Also, a new stream is used for each message, so there's no need to lock
  during the serialization process.

- This takes care of accounting for optimistic sends, so the
  nOptimisticBytesWritten hack can be removed.

- -dropmessagestest and -fuzzmessagestest have not been preserved, as I suspect
  they haven't been used in years.

* net: switch all callers to connman for pushing messages

Drop all of the old stuff.

* drop the optimistic write counter hack

This is now handled properly in realtime.

* net: remove now-unused ssSend and Fuzz

* net: construct CNodeStates in place

* net: handle version push in InitializeNode
2017-07-27 17:28:05 +03:00
UdjinM6
8b7dffbb64 Update startup shortcuts (#1551) 2017-07-25 13:58:27 +03:00
UdjinM6
9694658cd3 Make sure mixing messages are relayed/accepted properly (#1547)
* make sure addr of mixing mn matches peer's addr exactly (including port)

* Store addr of every mixing client and relay mixing mesasges to them only
2017-07-25 13:57:26 +03:00
Nathan Marley
a0851494db add masternodelist pubkey to rpc (#1549)
* add masternodelist pubkey to rpc

* add method in alphabetical order
2017-07-22 23:33:42 +03:00
UdjinM6
7707c07897 backport 9008: Remove assert(nMaxInbound > 0) (#1548) 2017-07-22 22:37:10 +03:00
Oleg Girko
82851b439c Backport Bitcoin PR#8049: Expose information on whether transaction relay is enabled in getnetwork (#1545)
* net: Add fRelayTxes flag

Add a fRelayTxes to keep track of the relay transaction flag
we send to other peers.

* rpc: Add `relaytxes` flag to `getnetworkinfo`

Re-work of PR #7841 by dragongem45.
Closes #7771.
2017-07-21 21:31:47 +03:00
Ilya Savinov
4942884c71 fix potential deadlock in CMasternodeMan::CheckMnbAndUpdateMasternodeList (#1543)
governance.cs -> mnodeman.cs:
CGovernanceManager::ProcessMessage - LOCK2(cs_main, governance.cs) -> AddGovernanceObject -> UpdateSentinelVariables -> CountEnabled - LOCK(mnodeman.cs)

mnodeman.cs -> governance.cs:
CheckMnbAndUpdateMasternodeList - LOCK2(cs_main, mnodeman.cs) -> activeMasternode.ManageState -> ManageStateLocal -> NotifyMasternodeUpdates -> СheckMasternodeOrphanObjects - LOCK2(cs_main, governance.cs)
... -> NotifyMasternodeUpdates -> CheckMasternodeOrphanVotes - LOCK2(cs_main, governance.cs)
... -> NotifyMasternodeUpdates -> UpdateCachesAndClean - LOCK2(cs_main, governance.cs)
2017-07-21 18:21:09 +03:00
Ilya Savinov
1c4e2946af fix potential deadlock in CGovernanceManager::ProcessVote (#1541)
govman.cs -> cs_vSend:
CGovernanceManager::ProcessVote - LOCK(govman.cs) -> RequestGovernanceObject -> PushMessage -> BeginMessage - LOCK(cs_vSend)

cs_vSend -> govman.cs:
ThreadMessageHandler -> TRY_LOCK(pnode->cs_vSend, lockSend) -> SendMessages -> AlreadyHave -> ConfirmInventoryRequest -> LOCK(govman.cs)
2017-07-21 12:47:38 +03:00
chaeplin
f47f0daf9a add 6 to strAllowedChars (#1542) 2017-07-21 12:36:34 +03:00
Oleg Girko
a9d771e497 Backport Bitcoin PR#8085: p2p: Begin encapsulation (#1537)
* net: move CBanDB and CAddrDB out of net.h/cpp

This will eventually solve a circular dependency

* net: Create CConnman to encapsulate p2p connections

* net: Move socket binding into CConnman

* net: move OpenNetworkConnection into CConnman

* net: move ban and addrman functions into CConnman

* net: Add oneshot functions to CConnman

* net: move added node functions to CConnman

* net: Add most functions needed for vNodes to CConnman

* net: handle nodesignals in CConnman

* net: Pass CConnection to wallet rather than using the global

* net: Add rpc error for missing/disabled p2p functionality

* net: Pass CConnman around as needed

* gui: add NodeID to the peer table

* net: create generic functor accessors and move vNodes to CConnman

* net: move whitelist functions into CConnman

* net: move nLastNodeId to CConnman

* net: move nLocalHostNonce to CConnman

This behavior seems to have been quite racy and broken.

Move nLocalHostNonce into CNode, and check received nonces against all
non-fully-connected nodes. If there's a match, assume we've connected
to ourself.

* net: move messageHandlerCondition to CConnman

* net: move send/recv statistics to CConnman

* net: move SendBufferSize/ReceiveFloodSize to CConnman

* net: move nLocalServices/nRelevantServices to CConnman

These are in-turn passed to CNode at connection time. This allows us to offer
different services to different peers (or test the effects of doing so).

* net: move semOutbound and semMasternodeOutbound to CConnman

* net: SocketSendData returns written size

* net: move max/max-outbound to CConnman

* net: Pass best block known height into CConnman

CConnman then passes the current best height into CNode at creation time.

This way CConnman/CNode have no dependency on main for height, and the signals
only move in one direction.

This also helps to prevent identity leakage a tiny bit. Before this change, an
attacker could theoretically make 2 connections on different interfaces. They
would connect fully on one, and only establish the initial connection on the
other. Once they receive a new block, they would relay it to your first
connection, and immediately commence the version handshake on the second. Since
the new block height is reflected immediately, they could attempt to learn
whether the two connections were correlated.

This is, of course, incredibly unlikely to work due to the small timings
involved and receipt from other senders. But it doesn't hurt to lock-in
nBestHeight at the time of connection, rather than letting the remote choose
the time.

* net: pass CClientUIInterface into CConnman

* net: Drop StartNode/StopNode and use CConnman directly

* net: Introduce CConnection::Options to avoid passing so many params

* net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options

* net: move vNodesDisconnected into CConnman

* Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting

* Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead

* net: move MAX_FEELER_CONNECTIONS into connman
2017-07-21 12:35:19 +03:00
Ilya Savinov
15958c594c fix potential deadlock (PR#1536 fix) (#1538)
mempool.cs -> mnodeman.cs:
`CreateNewBlock - LOCK2(cs_main, mempool.cs) -> FillBlockPayments -> FillBlockPayee -> GetNextMasternodeInQueueForPayment - LOCK(mnodeman.cs)`

mnodeman.cs -> mempool.cs
`CheckMnbAndUpdateMasternodeList - LOCK2(cs_main, mnodeman.cs) -> CheckOutpoint -> GetTransaction -> lookup - LOCK(mempool.cs)`
2017-07-20 13:48:30 +03:00
UdjinM6
0f05e25c71 fix a bug in CommitFinalTransaction (#1540) 2017-07-19 21:49:48 +02:00
Ilya Savinov
6cb3fddcc1 fixed potential deadlock in CSuperblockManager::IsSuperblockTriggered (#1536)
governance.cs -> mempool.cs:
`CGovernanceManager::ProcessMessage - LOCK2(cs_main, governance.cs) ->  GetTransaction ->  lookup - LOCK(mempool.cs)`

mempool.cs -> governance.cs:
`CreateNewBlock - LOCK2(cs_main, mempool.cs)  -> FillBlockPayments ->  IsSuperblockTriggered - LOCK(governance.cs)`
2017-07-18 19:25:02 +03:00
Oleg Girko
290fb3b57e Backport Bitcoin PR#7942: locking for Misbehave() and other cs_main locking fixes (#1535)
* lock cs_main for chainActive

ActivateBestChain uses chainActive after releasing the lock; reorder operations
to move all access to synchronized object into existing LOCK(cs_main) block.

* lock cs_main for State/Misbehaving

ProcessMessage calls State(...) and Misbehaving(...) without holding the
required lock; add LOCK(cs_main) blocks.
2017-07-17 20:49:17 +03:00
gladcow
8075370d1e change invalid version string constant (#1532) 2017-07-17 17:38:32 +03:00
Ilya Savinov
e0d6c5b5a2 fixed potential deadlock in CMasternodePing::SimpleCheck (#1534) 2017-07-17 16:59:04 +03:00
UdjinM6
9e9df28203 do not use masternode connections in feeler logic (#1533) 2017-07-17 16:54:35 +03:00
Oleg Girko
d934ffb2ff Added feeler connections increasing good addrs in the tried table. (#1530)
Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes.

This change was suggested as Countermeasure 4 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.
2017-07-17 13:39:12 +03:00
UdjinM6
27b6f36338 fix deadlock (#1531) 2017-07-17 10:06:15 +02:00
Oleg Girko
aa32f1dc97 Remove bad chain alert partition check (#1529)
As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.

*** Dash specific note: ***
This check was disabled in Dash already.
2017-07-16 23:17:04 +03:00
Oleg Girko
9ce2b966cd Backport Bitcoin PR#8113: Rework addnode behaviour (#1525)
* Rework addnode behaviour

* Use CNode::addeName to track whether a connection to a name is already open
  * A new connection to a previously-connected by-name addednode is only opened when
    the previous one closes (even if the name starts resolving to something else)
  * At most one connection is opened per addednode (even if the name resolves to multiple)
* Unify the code between ThreadOpenAddedNodeConnections and getaddednodeinfo
  * Information about open connections is always returned, and the dns argument becomes a dummy
  * An IP address and inbound/outbound is only reported for the (at most 1) open connection

* Prevent duplicate connections where one is by name and another by ip

* Randomize name lookup result in ConnectSocketByName
2017-07-14 19:58:57 +03:00
Ilya Savinov
916af52c0a Fix vulnerability with mapMasternodeOrphanObjects (#1512)
* fix vulnerability with mapMasternodeOrphanObjects

The vulnerability is that a malicious node can send a lot of NetMsgType::MNGOVERNANCEOBJECT messages which refer to many arbitrary MN's. In this case, mapMasternodeOrphanObjects will grow unrestrictedly.

* MN collateral moved to governance-object.cpp; ban score applied to misbehaving nodes

* recursive locks removed

* check for the mn collateral code segregated to a separate function

* CheckCollateral implementation moved to cpp
2017-07-13 12:38:00 +03:00
Oleg Girko
eea78d45ed Revert "fixed regtest+ds issues" (#1524)
This reverts commit 1f828f45ec.

The commit being reverted changed FindNode(const CService& addr)
to make no difference between nodes with the same IP address,
but different ports, but only for regtest network.
As functional tests run several nodes on different ports or the same
IP address (127.0.0.1), this eventually started breaking functional tests.
The only use for regtest network I know is for functional tests,
so it's time to revert that commit.
2017-07-13 09:07:50 +03:00
chaeplin
f9dd40888e include atomic (#1523) 2017-07-12 23:08:18 +03:00
Ilya Savinov
f7aa81586f Fix issues with mapSeenGovernanceObjects (#1511)
* fix issues with mapSeenGovernanceObjects

Removed seen-governance-objects optimization except for deleted objects. Otherwise some nodes can permanently lost proposals if they received them too early.
Beside of that there is a vulnerability with seen-governance-objects mechanism if malicious node send us a lot of invalid governance objects.

* mapSeenGovernanceObjects renamed to mapErasedGovernanceObjects

* current fixes

* use int64_t for expiration timestamp
2017-07-12 23:08:06 +03:00
Oleg Girko
7b5556a294 Backport Bitcoin PR#8084: Add recently accepted blocks and txn to AttemptToEvictConnection (#1522)
* Add recently accepted blocks and txn to AttemptToEvictConnection.

This protects any not-already-protected peers who were the most
 recent four to relay transactions and most recent four to send
 blocks to us.

* Allow disconnecting a netgroup with only one member in eviction.

With the latest additions there are enough protective measures that
 we can take the training wheels off.
2017-07-12 14:13:38 +03:00
Oleg Girko
5a1961e5e3 Backport Bitcoin PR#7906: net: prerequisites for p2p encapsulation changes (#1521)
* net: don't import std namespace

This file is about to be broken up into chunks and moved around. Drop the
namespace now rather than requiring other files to use it.

* net: remove unused set

* net: use the exposed GetNodeSignals() rather than g_signals directly

* net: make Ban/Unban/ClearBan functionality consistent

- Ban/Unban/ClearBan call uiInterface.BannedListChanged() as necessary
- Ban/Unban/ClearBan sync to disk if the operation is user-invoked
- Mark node for disconnection automatically when banning
- Lock cs_vNodes while setting disconnected
- Don't spin in a tight loop while setting disconnected

* net: No need to export DumpBanlist
2017-07-12 04:20:12 +03:00
Oleg Girko
9a8a290b87 fix race that could fail to persist a ban (#1518)
DumpBanList currently does this:
  - with lock: take a copy of the banmap
  - perform I/O (write out the banmap)
  - with lock: mark the banmap non-dirty
If a new ban is added during the I/O operation, it may never be persisted to
disk.

Reorder operations so that the data to be persisted cannot be older than the
time at which the banmap was marked non-dirty.
2017-07-11 09:15:14 +03:00
Oleg Girko
b47984f303 Remove non-determinism which is breaking net_tests #8069 (#1517) 2017-07-11 02:03:14 +03:00
UdjinM6
397ea95dbb Implement BIP69 outside of CTxIn/CTxOut (#1514)
Apply BIP69 on transaction creation only, fix inputs order to match the BIP
2017-07-10 17:42:59 +03:00
UdjinM6
7abac068b6 fix MakeCollateralAmounts (#1500)
apply same logic as in CreateDenominated to avoid joining inputs from different addresses
2017-07-10 17:42:32 +03:00
UdjinM6
739ef9a681 Expire confirmed DSTXes after ~1h since confirmation (#1499)
* Expire confirmed DSTXes after ~1h since confirmation

* add missing cs_main lock
2017-07-10 17:42:09 +03:00
gladcow
70eb83a5ce New rpc call "masternodelist info" (#1513)
* add masternodelist info call

* safe version conversion function

* change default sentinel version value

* fix issues
2017-07-10 17:41:42 +03:00
Oleg Girko
9268a336dd Backport Bitcoin PR#7917: Optimize reindex (#1515)
* Make ProcessNewBlock dbp const and update comment

* Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards

* Optimize ActivateBestChain for long chains

* Add -reindex-chainstate that does not rebuild block index

* Report reindexing progress in GUI
2017-07-10 17:41:14 +03:00
Oleg Girko
b39c518d5a Backport Bitcoin PR#7749: Enforce expected outbound services (#1508)
* Only store and connect to NODE_NETWORK nodes

* Keep addrman's nService bits consistent with outbound observations

* Verify that outbound connections have expected services

* Don't require services in -addnode

* Introduce enum ServiceFlags for service flags

* Introduce REQUIRED_SERVICES constant
2017-07-05 06:45:23 +03:00
Oleg Girko
6af9955faa Backport Bitcoin PR#7696: Fix de-serialization bug where AddrMan is corrupted after exception (#1507)
* CAddrDB modified so that when de-serialization code throws an exception Addrman is reset to a clean state
* CAddrDB modified to make unit tests possible
* Regression test created to ensure bug is fixed
* StartNode modifed to clear adrman if CAddrDB::Read returns an error code.
2017-07-05 03:40:22 +03:00
Ilya Savinov
109c5fd1d8 Fixed issues with propagation of governance objects (#1489)
* process governance objects in CheckMasternodeOrphanObjects as usual

* code refactoring: SetRateChecksHelper class added

* fixed race condition issues with propagation of governance objects

* change GetCollateralConfirmations signature

* code refactoring

* reduced minimum number of collateral confirmations required for relaying proposals

* bug fixes and improvements
2017-07-05 03:31:50 +03:00
Oleg Girko
d787fe4ab6 Backport Bitcoin PR#7458 : [Net] peers.dat, banlist.dat recreated when missing (#1506) 2017-07-05 02:26:13 +03:00
Oleg Girko
ac6c3c9008 Backport Bitcoin PR#7350: Banlist updates (#1505)
* banlist: update set dirty to be more fine grained

- move the SetBannedSetDirty(false) call from DumpData() into DumpBanlist()
- ensure we only set false, if the write succeeded

* banlist: better handling of banlist in StartNode()

- only start working on/with banlist data, if reading in the banlist from
  disk didn't fail
- as CNode::setBannedIsDirty is false (default) when reading fails, we
  don't need to explicitly set it to false to prevent writing
  banlist.dat in that case either

* banlist: add more banlist infos to log / add GUI signal

- to match the peers.dat handling also supply a debug.log entry for how
  many entries were loaded from banlist.dat and how long it took
- add a GUI init message for loading the banlist (same as with peers.dat)

- move the same message for peers.dat upwards in the code, to be able to
  reuse the timing variable nStart and also just log, if our read from
  peers.dat didn't fail

* banlist (bugfix): allow CNode::SweepBanned() to run on interval

- allows CNode::SweepBanned() to run, even if !CNode::BannedSetIsDirty(),
  because if nBanUntil is over we want the ban to be disabled for these
  nodes
2017-07-05 00:39:05 +03:00
gladcow
a439e98408 Replace watchdogs with ping (#1491)
* Add hassentinelping to governanceinfo

* sentinelping rpc call

* additional fields in mnp

* sentinel ping implementation

* change sentinel state to byte in mnp

* use adjusted time in sentinel ping

* update nTimeLastWatchdogVote if sentinel ping is actual

* remove unused fields

* bump protocol to 70207

* Fix small issues

 - fix the error message text in CActivbeMasternodeUpdateSentinelPing;
 - add empty string before public: in CActiveMasternode class declaration;
 - rename field sentinelPing in CMasternodePing to sentinelIsActual and change $
 - decrease sentinelVersion field size to uint16_t;

* revert proto bump for MIN_... consts

* revert changes in getgovernanceinfo

* Update mn vote time for remote masternodes

 - call UpdateWatchdogVoteTime in CMasternodeMan::ProcessMessage
 - deserialize masternodeping from the previous version archive without exception
 - add ability to set time in UpdateWatchdogVoteTime
 - set nTimeLastWatchdogVote to masternode ping sigTime if sentinel is actual
 - bump CMasternodeMan::SERIALIZATION_VERSION_STRING

* remove mn state checks and add correct rpc param convertion

* fix var names

* Helper class for version in string and integer form

* String version in sentinel ping

Version format is "x.x.x"

* test for bacward compatibility in serialization

* Change VersionInfo class to convert functions
2017-07-04 20:31:57 +03:00
Oleg Girko
f65017cfeb Backport Bitcoin PR#7349: Build against system UniValue when available (#1503)
* Build against system UniValue when available

* doc: Add UniValue to build instructions

* Bugfix: The var is LIBUNIVALUE,not LIBBITCOIN_UNIVALUE

* Change default configure option --with-system-univalue to "no"

* Bugfix: Always include univalue in DIST_SUBDIRS

* LDADD dependency order shuffling

* build-unix: Update UniValue build conditions
2017-07-04 06:20:19 +03:00
UdjinM6
96f0d6ec2b various trivial cleanup fixes (#1501) 2017-07-03 16:14:07 +03:00
Oleg Girko
b0843c397c Backport Bincoin PR#7348: MOVE ONLY: move rpc* to rpc/ + same for Dash-specific rpc (#1502) 2017-07-03 16:13:34 +03:00
UdjinM6
549b659e8c Force self-recheck on CActiveMasternode::ManageStateRemote() (#1441)
(otherwise code below could fail if we received new mnb right after latest check and thus our MN will not start)
2017-07-01 22:00:40 +03:00
Oleg Girko
a12491448d Eliminate unnecessary call to CheckBlock (#1498)
ProcessNewBlock would return failure early if CheckBlock failed, before
calling AcceptBlock.  AcceptBlock also calls CheckBlock, and upon failure
would update mapBlockIndex to indicate that a block was failed.  By returning
early in ProcessNewBlock, we were not marking blocks that fail a check in
CheckBlock as permanently failed, and thus would continue to re-request and
reprocess them.
2017-07-01 21:57:28 +03:00
UdjinM6
029ee64948 split CPrivateSend (#1492)
* split CPrivateSend:
- common client/server base data structures/functions: CPrivateSendBase
- singleton-like helper: CPrivateSend

* GetCollateralAmount(), more of GetSmallestDenomination()

* refactor GetDSTX

* remove excessive static_cast<bool>

* bring back LOCK(cs_mapdstx) :)

* address review comments

* fix bool operator
2017-06-30 21:30:16 +03:00
Oleg Girko
f9730cb2ec Increase test coverage for addrman and addrinfo (#1497)
Adds several unittests for CAddrMan and CAddrInfo.
Increases the accuracy of addrman tests.
Removes non-determinism in tests by overriding the random number generator.
Extracts testing code from addrman class to test class.
2017-06-30 21:29:29 +03:00
Oleg Girko
a443d4e2d0 Backport Bitcoin PRs #6589, #7180 and remaining part of #7181: enable per-command byte counters in CNode (#1496)
* log bytes recv/sent per command

* net: Account for `sendheaders` `verack` messages

Looks like these were forgotten in #6589.

* Backport remaining part of Bitcoin PR bitcoin/bitcoin#7181.

Most of this PR is already merged, but a small part remaining
that makes per-command byte counts in CNode working.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-06-29 04:51:10 +03:00
Alexander Block
1d67d52122 Don't try to create empty datadir before the real path is known (#1494)
Fixes: #1345

The actual problem is that GetDataDir has the side effect of creating the
datadir, even if it is not known yet where it really is. This is only
known after reading the config file or when explicitly specified in the
cmd line.

Thus, if GetDataDir gets called before the datadir value from the config
is read, it tries to create it at the default location.
2017-06-26 16:57:16 +03:00
Tim Flynn
a109a611f3 Validate proposals on prepare and submit (#1488)
* Implement proposal validation

Includes commits:
  Implemented CProposalValidator

  Use CProposalValidator to check proposals at prepare and submit stages

  Modify proposal validator to support numerical data in string format

  Multiple bug fixes in governance-validators.cpp

  Fixed bug in CheckURL

  Fixed stream state check

  Increase strictness of payment address validation for compatibility with sentinel

  Improved error reporting

  Implemented "check" rpc command to validate proposals

  Fixes to RPC check command

  Fix error message

  Unit test and data files for proposal validator

  Added test cases

  Removed debugging code

* Fix name validation

* Changes to address code review comments
2017-06-26 16:56:29 +03:00
Spencer Lievens
72fbfe93d8 Icon Cutoff Fix (#1485)
This will prevent the cutoff of the connections icon when using this theme.
2017-06-06 02:47:36 +03:00
UdjinM6
bea548c612 adjust/fix some log and error messages (#1484)
* adjust/fix some log and error messages

* revert penalty

* more newline/c_str fixes

* lld -> llu
2017-06-06 02:47:23 +03:00
UdjinM6
2daea77a5b fix calculation of (unconfirmed) anonymizable balance (#1477)
* fix calculation of (unconfirmed) anonymizable balance

* store cache with the same param combination as in use
2017-06-06 02:47:12 +03:00
UdjinM6
a28fa724c2 fix BIP34 starting blocks for mainnet/testnet (#1476) 2017-06-06 02:46:58 +03:00
Spencer Lievens
b6804678f2 Minor Warning Fixed (#1482)
Follow up to #1405
2017-05-31 06:50:16 +03:00
UdjinM6
5988e1e7f5 Increase minimum debug.log size to 10MB after shrink. (#1480) 2017-05-31 06:49:22 +03:00
UdjinM6
fc406f2d82 track asset sync time (#1479) 2017-05-31 06:49:09 +03:00