Commit Graph

18352 Commits

Author SHA1 Message Date
dustinface
ebe7e80a49
bitcoin#9680: Unify CWalletTx construction (#3680)
* [wallet] Construct CWalletTx objects in CommitTransaction

Construct CWalletTx objects in CWallet::CommitTransaction, instead of having
callers do it. This ensures CWalletTx objects are constructed in a uniform way
and all fields are set.

This also makes it possible to avoid confusing and wasteful CWalletTx copies in
https://github.com/bitcoin/bitcoin/pull/9381

There is no change in behavior.

* [wallet] Get rid of CWalletTx default constructor

No change in behavior in the normal case. But buggy mapWallet lookups with
invalid txids will now throw exceptions instead of inserting dummy entries into
the map, and potentially causing segfaults and other failures.

This also makes it a compiler error to use the mapWallet[hash] syntax which
could create dummy entries.

* Apply suggestions from code review

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-21 13:43:33 +03:00
dustinface
667c81e5e7
rpc: Add chainlock BLS signature to getbestchainlock (#3718) 2020-09-18 14:07:52 +03:00
dustinface
196cfa99f4
qt: Hide remaining PrivateSend UI if PrivateSend is not enabled (#3716)
* qt: Rename two PrivateSend related labels in OptionsDialog

* qt: Hide main PrivateSend UI elements if its not enabled

- Tab button
- Menu actions

* qt: Hide PrivateSend in OptionsDialog options if its not enabled.

* qt: Hide PrivateSend filter in TransactionView if its not enabled

* Update toolbar shortcuts to match toolbar buttons visibility

* Update src/qt/transactionview.cpp

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-18 13:15:55 +03:00
dustinface
836bd4fccf
qt: Disable missing macOS focus rects in AddressBookPage (#3711) 2020-09-18 13:15:26 +03:00
UdjinM6
18cfcbfd2a
qt: Finetune Options Dialog (#3709)
* Fix proxy port ui elements

* Fix fake net checkboxes

* Fix active options label by enabling text wrapping

* Fix options dialog resizing when font size is changed

* Move "Window" tab options into "Main" tab, drop "Window" tab

* Shrink min sizes a bit

* qt: Drop the surrounding QGroupBox in Options -> Wallet

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-18 13:00:10 +03:00
UdjinM6
6587d10857
qt: Make sure send confirmation dialog uses correct font settings (#3714) 2020-09-17 14:42:47 +03:00
dustinface
9dd8e2a5a5
qt: Use scaled font size for all QToolTip instances (#3708) 2020-09-16 12:14:23 +03:00
dustinface
1c76e3e152
qt: Make sure font size in TransactionDescDialog is adjusted properly (#3707) 2020-09-16 12:14:09 +03:00
UdjinM6
80d7c5a0cf
qt: Tweak few strings (#3706)
* Tweak few strings to make it easier to translate

Use args when it makes sense. Wrap 2 more strings with `tr()`.

* Fix typo
2020-09-16 12:13:42 +03:00
dustinface
7c74c7d022
qt|wallet: Fix "Use available balance" for PrivateSend (#3700)
* wallet: Allow CoinControl in GetAnonymizedCredit + GetAnonymizedBalance

* qt: Allow CoinControl in WalletModel::getAnonymizedBalance

* qt: Use CoinControl in SendCoinsDialog::useAvailableBalance for PS

* wallet: Fix caching in GetAnonymizedCredit
2020-09-13 01:48:45 +03:00
dustinface
aebe361582
qt: Finetune ModalOverlay (#3699)
* qt: Align warning icon in ModalOverlay properly with the text

* qt: Center form layout in modaloverlay
2020-09-13 01:48:23 +03:00
dustinface
3fe3ca9666
qt: Make sure the statusbar reflects internal states correct (#3698)
* qt: Increase number of spinner frames

* qt: Add and use BitcoinGUI::startSpinner and BitcoinGUI::stopSpinner

* qt: Handle CMasternodeSync::Reset calls

* qt: Make sure the statusbar always reflects the sync state/progress

* qt: Add BitcoinGUI::updateProgressBarVisibility

* qt: Animate connection icon while connecting

* qt: Refactor check in BitcoinGUI::updateProgressBarVisibility

* qt: Rename some variables

* Update src/qt/bitcoingui.cpp

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-09-13 01:48:10 +03:00
PastaPastaPasta
df536f269a
Merge #13622: Remove mapRequest tracking that just effects Qt display. (#3694)
* Merge #13622: Remove mapRequest tracking that just effects Qt display.

beef7ec4be725beea870a2da510d2817487601ec Remove useless mapRequest tracking that just effects Qt display. (Matt Corallo)

Pull request description:

  I thought we had removed this a long time ago, TBH, its really
  confusing feedback to users that we display whether a tx was
  broadcast to immediate neighbor nodes, given that has little
  indication of whether the tx propagated very far.

Tree-SHA512: c9d0808fb60146919bb78d0860ec2193601966c944887eaae7837408422f7e85dfdb306407a613200cdd4726aec66da18df618ebc6a8cfe8650bf08d4a8dc155
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	src/interfaces/wallet.cpp
#	src/interfaces/wallet.h
#	src/net_processing.cpp
#	src/qt/guiconstants.h
#	src/qt/transactiondesc.cpp
#	src/qt/transactionrecord.cpp
#	src/qt/transactionrecord.h
#	src/qt/transactiontablemodel.cpp
#	src/validationinterface.cpp
#	src/validationinterface.h
#	src/wallet/wallet.cpp

* drop TX_STATUS_OFFLINE

Signed-off-by: pasta <pasta@dashboost.org>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2020-09-12 17:33:54 +03:00
UdjinM6
ab8347e06b
Implement dynamic activation thresholds (#3692)
* Implement dynamic activation thresholds

* fix

* Revert unrelated changes

* Clarify switching to/staying in LOCKED_IN state

* Fix signal function to work correctly with num_blocks=0

* Add simplified threshold calculation and use it in tests

* Check that thresholds are decreasing, reach the min level and stay there

* Drop `;`
2020-09-12 17:33:12 +03:00
dustinface
5176a26007
masternode|net|rpc: Improve masternode sync process (#3690)
* masternode: Replace sync states INITIAL and WAITING with BLOCKCHAIN

* masternode: Peer dependent "assume tip" timeout

I would say its enough to only wait 1 tick if we have more than 3
peers before we move over to governance sync.

* masternode: Notify the UI instantly if switched to governance sync

Without this it takes one iteration more for the UI to receive the
update.

* masternode: Notify the UI about CMasternodeSync::Reset calls

* masternode: Don't instantly reset the sync process

Give it MASTERNODE_SYNC_RESET_SECONDS (600) seconds time after the last
UpdateBlockTip call.

* rpc: Don't switch to next asset in "mnsync reset"

* rpc: Force the reset in "mnsync reset"

* net: Make sure the sync gets a reset if required after network changes

This will reset the sync process if its outdated in the following cases:

- If the connections dropped to zero
- If the connections went from zero to one
- If the network has been enabled or disabled

* Apply suggestions from code review

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* net: Only open masternode connections if the blockchain is synced

In general it doesn't make sense to connect to masternodes before due to 
MNAUTH requires blockchain sync. This could lead to failing quorum 
connections/failing masternode 
probing.. if a just restarted node/a out of sync node 
would hit a dkg block.. Then they would not try to open those 
llmq/probing connections for the next 60s (nLLMQConnectionRetryTimeout). 
Thats basically what happens in tests right now and they fail without 
this commit.

* test: Make sure nodes are synced when they get restored after isolation

Their sync might be out of date otherwise due to bigger mocktime bumps

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-11 15:07:34 +03:00
dustinface
ee32ee0ddf
qt: Improved status bar (#3688)
* qt: Adjust green color

* qt: Don't disable the HD icon

Disabling it leads to incorrect colors due to opacity.

* qt: Move the HD icon to the left

Reason: Its the only one not turning green by default if all is set
properly. So this lets is look better imo.

* qt: Increase statusbar icon size

* qt: Show lock icon in status bar also if wallet is not encrypted

Just as signal to the user!

* qt: Refine connection icon usage

* qt: Use state related colors in statusbar

* qt: Hide the HD icon for non-HD wallets

* qt: Update HD icon
2020-09-11 15:07:12 +03:00
dustinface
1e835a629e
chainparams: Remove llmq_50_60 from regtest (#3696)
Its just not used anywhere so there is no point in starting the thread 
for it imo since it just spams the test logs with tries/failures.
2020-09-10 19:28:56 +03:00
dustinface
c7a9f47e42
qt: Update assets and colorize them theme related (#3574)
* qt: Replaced checkbox images with new ones

* qt: Replaced radiobutton images with new ones

* qt: Redefine arrow usage

- Removed "hover" arrows
- Rename normal -> light
- Rename pressed -> dark
- Use light as hover in dark theme and vice versa

* qt: Update icon set

* qt: Update sync spinner

* qt: Add new ThemedColor's

- ThemedColor::ORANGE
- ThemedColor::ICON_ALTERNATIVE_COLOR

* qt: Add GUIUtil::getIcon and GUIUtil::setIcon

* qt: Use themed icons where required

* qt: Make sure icons in SendCoinsEntry are updated on style changes

* qt: Make sure status bar icons are updated on style changes

* qt: Make sure icons in RPCConsole are updated on style changes

* qt: Remove icon/iconsSize in modaloverlaydialog.ui

* qt: Remove obsolete qproperty-iconSize entries from general.css

* qt: Use QToolButton's in SendVerifyMessageDialog and RPCConsole

Instead of QPushButton. This is to have the same alignment of the
iconized buttons by default like in SendCoinsEntry

* qt: Revert arrow icons

* qt: Revert HD icons
2020-09-10 19:28:05 +03:00
UdjinM6
d838ec0370
Implement Block Reward Reallocation (#3691)
* Implement Block Reward Reallocation

* Add integr. test

* drop unused variable

* Sep -> Oct

* Update test/functional/feature_block_reward_reallocation.py

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Revert to Sep for testnet and devnet

* validation: Refactor reallocation calculations

Makes it much more readable imo and avoids calculating the percentage
each time.

* test: Align reallocation calculation with c++ (GetMasternodePayment)

* test: Make feature_block_reward_allocation.py executable

* Make linter happy

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-10 19:23:11 +03:00
UdjinM6
d711c2765b
Fix two potential issues in the way pending islocks are processed (#3678)
* Always check for previous quorum set in llmq IS

* Refactor SelectQuorumForSigning and related code

Should have no changes in behaviour

* Do not use SIGN_HEIGHT_OFFSET when checking pending IS locks, use actual chain tip

This commit actually changes the behaviour
2020-09-09 13:29:59 +03:00
dustinface
13de970063
masternode|rpc: Remove unused code (#3689) 2020-09-08 13:02:50 +03:00
dustinface
3f8d27dc41
qt: Ignore GUIUtil::updateFont calls until GUIUtil::loadFonts was called (#3687) 2020-09-08 12:55:38 +03:00
dustinface
a719c49bfa
qt: Fix block update signals/slots in BitcoinGUI and SendCoinsDialog (#3685) 2020-09-08 12:54:49 +03:00
dustinface
c207e0c953
test: Implement unit tests for CTransactionBuilder (#3677)
* makefile.test.include: Let privatesend_tests.cpp depend on ENABLE_WALLET

* test: Implement unit tests for CTransactionBuilder

* Check that we can decrease the amount and GetAmountLeft() is updated accordingly

* Check if resulting tx has a change output when expected

* Avoid pushing nullptr into vecOutputs

* Add few notes about size calculations

* nit: better readability (imo)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-05 00:25:16 +03:00
dustinface
45103780f7
test: Implement unit tests for CWallet::CreateTransaction (#3667)
* test: Implement unit tests for CWallet::CreateTransaction

* test: Reset minRelayTxFee in CreateTransactionTest

At this point its modified from an other test when running all unit 
tests which lets this test fail unexpectedly.

* test: Lock cs_main/cs_wallet when required in CreateTransactionTest

* test: Add new test in CreateTransactionTest

Test if the wallet creation fails properly with the correct error
messages.

* test: Fixed expected test results for some CreateTransactionTest cases

* test: Fail if CreateTransaction runs into "Exceed max tries" case

* test: Adjust last return in CreateTransaction

* test: Drop dust tests
2020-09-05 00:24:41 +03:00
dustinface
5c3f3e635a
wallet: Fix and improve CWallet::CreateTransaction (#3668)
* wallet: Remove unused vecTxDSInTmp in CWallet::CreateTransaction

* wallet: Calculate fees earlier and respect them in change determination

* wallet: Cleanup obsolete code in CreateTransaction

This parts were needed before when the fee was calculated after the
change was assigned. But now with the previous commit the fee is
calculated upfront and respected properly from the begining. So there is
no longer a need of increasing or decreasing the change depending on the
fee as it has the correct value directly after its added.

* wallet: Try to pick other inputs if the selected ones are too small

If nChange is negative in this cases it means that the selected inputs
can't cover the amount to send and the required transaction fee. So we
just add the missing amount to nFeeRet. This leads to the algo
trying to pick larger inputs in the next loop (with nFeeRet more duffs
than in the previous loop). This process gets repeated until the selected
amount is enough to cover all the costs or until the requested amount
can't be selected anymore (not enough utxos to cover it).

* wallet: Break the loop if the transaction is ready

* wallet: Respect additional amount from previous cycles

* wallet: Respect available in coin selection, try all coins in last round

* wallet: Avoid potential infinite loop, just in case..

* wallet: Fix signing in CreateTransaction

Prior it was messed because of 60d96a1a28b55f071c6144f248e136679c44337e. 
Set coins isn't sorted the same way as txNew.vin is so it sometimes may 
pick wrong coins for signing the input.

* wallet: Fix change calculation if "subtract fee from amount" is enabled

* wallet: Return after fee calc if no or not enough amount available

Return the proper fail reason. Prior to this commit it run into
"Exceeded max tried".

Note: Only return if not enough amount is available if we can't subtract
fee from amount.

* wallet: Fix break logic if available amount is not enough

* Revert "wallet: Fix signing in CreateTransaction"

This reverts commit 5fcdc0f00e7b961ebb62c94d17d585537e911309.

* Use a vector of coins instead of a set in CreateTransaction and sort it in a BIP69 compliant way when needed

* wallet: Adjust comment

* Cleaner usage of nChangePosRequest/InOut

* Simplify some fail/try-again conditions (fixed)

* Loop through outputs to update change output position only when outputs are sorted for BIP69

No need to do this for non-bip69 cases (i.e. when a specific change output position was requested and assigned)

* Avoid implicit conversions of int-s into bool-s

* Move `nAmountLeft == nFeeRet` check higher, tweak comments

* wallet: Fix some formatting

* wallet: Improve CTxIn creation in CreateTransaction

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-04 15:00:55 +03:00
dustinface
a206af443d
privatesend|wallet|qt: Improve calculations in CreateDenominated/MakeCollateralAmounts (#3657)
* wallet: Add m_dust_feerate to CCoinControl / Use it in CreateTransaction

* privatesend: Introduce CTransactionBuilder/CTransactionBuilderOutput

Builder classes for transactions from type

Inputs: Defined by CompactTallyItem
Outputs: Simple outputs with lose reserve keys

This takes fully takes care of fee calculations and makes sure calculations are the same like those happening when actually create the transaction with CreateTransaction.

* privatesend: Improve amount/fee calculation in CreateDenominated

* privatesend: Improve amount/fee calculation in MakeCollateralAmounts

* qt: Fix decomposeTransaction's MakeCollateralAmounts detection

Align it with the three cases in CPrivateSendClientSession::MakeCollateralAmounts

* Refactor GetFee

The fee rate is always coinControl.m_feerate, also it's not used outside so should be a private method

* Simplify nBytesOutput calculations

* Drop unused GetBytesOutput()

* Make Clear(), GetBytesTotal() and GetAmountUsed() private

* Drop unused GetCoinControl()

* Make ToString() const

* Refactor `CTransactionBuilder::Commit()`

* Reorder cases in decomposeTransaction

* Fix "finished" conditions in CreateDenominated

* Fix typo

* wallet|privatesend: Refactor CCoinControl's m_dust_feerate -> m_discard_feerate

* privatesend: Drop unused member CTransactionBuilder::dustFeeRate

* privatesend: Improve CTransactionBuilder's readability

* privatesend: Make the static CTransactionBuilder::GetAmountLeft private

* wallet: Recover previous code style

* Update src/privatesend/privatesend-util.cpp

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* Tweak CTransactionBuilder to respect potential compact size diffs

* Tweak GetFee param type

* Trivial log/comments tweaks

* privatesend: Fix countPossibleOutputs

- Fix off by one issue
- Respect max outputs threshold

* privatesend: Use GetSizeOfCompactSizeDiff in CTransactionBuilder

* Apply suggestions from code review

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* privatesend: Rename TryAdd to CouldAdd in CTransactionBuilder

* wallet: Reset m_discard_feerate in CCoinControl::SetNull

* Respect `-paytxfee` and `settxfee`

* privatesend: Check for denominated amount only where really required

* qt: Remove obsolete IsCollateralAmount() checks

* privatesend: Don't accept negative amounts in CTransactionBuilder

* privatesend: Remove unused CConnman parameter

* use emplace_back instead of push_back

Signed-off-by: pasta <pasta@dashboost.org>

* fix typos

Signed-off-by: pasta <pasta@dashboost.org>

* make GetAmount const

Signed-off-by: pasta <pasta@dashboost.org>

* privatesend: Explicit capture __func__ in needMoreOutputs lambda

* privatesend: Update CTransactionBuilder::UpdateAmount

* remove const on parameter in declaration

Signed-off-by: pasta <pasta@dashboost.org>

* handle unsigned int -> int conversions a bit better

Signed-off-by: pasta <pasta@dashboost.org>

* explicitly cast to int from unsigned int.

estimateSmartFee handles it if negative

Signed-off-by: pasta <pasta@dashboost.org>

* Make CTransactionBuilderOutput::GetScript const

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* privatesend: Update comments to follow doxygen

* privatesend: Add class descriptions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
2020-09-01 18:27:33 +03:00
UdjinM6
62551a220a
ci: Add workflow:rules to fix Gitlab warnings (#3679) 2020-08-30 17:24:26 +03:00
sc-9310
c8ef16a6d6
QT: add last block hash to debug ui (#3672)
* [QT] Add last block hash to debug ui

Trivial addition to display last block hash next to last block time

* [QT] Make last block hash selectable

... and linter happy

Switch QMetaObject to get last hash from pIndex instead of clientmodel

* [Trivial] Fix trailing whitespaces
2020-08-30 17:24:05 +03:00
PastaPastaPasta
e8e34b836a
docs: Adjust developer-notes.md to use signed ints normally (#3663)
* Adjust developer-notes.md to use signed ints normally

Signed-off-by: pasta <pasta@dashboost.org>

* Adjust wording in dev-notes

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* remove trailing whitespace

Signed-off-by: pasta <pasta@dashboost.org>

* Remove trailing whitespace

* maybe fix linter

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-30 17:22:51 +03:00
PastaPastaPasta
8baf69d448
Harden spork6 logic then remove spork6 (#3662)
* Harden Spork6

Spork6 was previously activated on testnet, but we then developed an alternative fix for the issue and never activated spork6 on mainnet. At this point, Spork6 will not be activated on mainnet.
As such, it makes sense to harden Spork6 and ensure that spork6 will never be activated on mainnet. So, we just change from checking Spork6 to checking if we are on testnet. If we are on testnet, use spork6 logic, else don't.

Signed-off-by: pasta <pasta@dashboost.org>

* remove now unused SPORK_6_NEW_SIGS

Signed-off-by: pasta <pasta@dashboost.org>

* force fSporkSixActive to be correct, otherwise return

Signed-off-by: pasta <pasta@dashboost.org>

* Harden spork6 even more

* Add TODO in chainparams as a reminder to drop all spork6 related code on next testnet reset

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-30 17:22:21 +03:00
PastaPastaPasta
533b2fe9f1
privatesend: Implement Random Round Mixing (#3661)
* Use GetRealOut... instead of Capped

Signed-off-by: pasta <pasta@dashboost.org>

* Add "ps_salt" value to walletdb

This value is used to deterministically pick a random number of rounds to mix, between N and N + GetRandomRounds. A salt is needed in addition to the inputs hash to ensure that an attacker learns nothing from looking at the blockchain.

Signed-off-by: pasta <pasta@dashboost.org>

* Implement Random Round Mixing

This implements "Random Round Mixing." Previously, attempted attacks on PrivateSend assumed that all inputs had been mixed for the same number of rounds. Noramlly assuming 2,4,8 or 16.

While none of these attacks have been successful, they still teach what we can do to make our system more robust, and one of those ways is to implement "Random Round Mixing".

Under the previous system, inputs were mixed up until N rounds (configured by user). At this point, the input was considered mixed, and could be private-sent. Under this new system, an input will be mixed to N rounds like prior. However, at this point, Sha256d(input, salt) will be calculated (note: this likely could be a more efficient hash function than double sha256, but that can be done in another PR / version if needed). If (hash % 2 == 0), then the input will be mixed again.
This results in an exponential decay where if you mix a set of inputs, half of those inputs will be mixed for N rounds, 1/4 will be mixed N+1, 1/8 will be mixed N+2, etc. This current implementation caps it at N+2. This results in mixing an average of N+0.875 rounds. If you removed the cap, you would mix on average N+1 rounds.

Signed-off-by: pasta <pasta@dashboost.org>

* Make PS salt a private member of CWallet, tweak the way it's initialized

* Introduce `CWallet::IsFullyMixed` and use it everywhere instead of comparing rounds directly to ensure consistency between coin selection logic, balance calculations and gui

* Tweak `GetRealOutpointPrivateSendRounds` to respect random rounds

* Tweak IsFullyMixed to make decision on a per-outpoint basis instead of a per-tx one

* make a comment doxygen

Signed-off-by: pasta <pasta@dashboost.org>

* Rename GetPrivateSendSalt InitPrivateSendSalt, since it is not a getter

Signed-off-by: pasta <pasta@dashboost.org>

* move the comment below GetRounds call

Signed-off-by: pasta <pasta@dashboost.org>

* don't use GetCappedOutpointPrivateSendRounds when printing to RPC

Signed-off-by: pasta <pasta@dashboost.org>

* Simplify hashing in IsFullyMixed

Uses just 1 sha256 instead of 3 (1 in SerializeHash + 2 in Hash)

* undo comment change

Signed-off-by: pasta <pasta@dashboost.org>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-30 17:21:45 +03:00
PastaPastaPasta
404014d31a
change argument name to reflect the fact that it's a return value (#3673)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-27 12:51:31 +03:00
PastaPastaPasta
e75c18a60b
trivial/docs: minor adjustments to PrivateSend help text (#3669)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-24 18:17:13 +03:00
dustinface
997e79439b
Merge #13007: test: Fix dangling wallet pointer in vpwallets (#3666)
* test: Fix importwallet_rescan test

The wallet should be removed after the dumpwallet() call otherwise it 
may lead to unepexted behaviour in other wallet tests since the wallet 
stays in vpwallets then.

* tests: Change where RemoveWallet call is to be more in line with upstream

Signed-off-by: pasta <pasta@dashboost.org>

Co-authored-by: pasta <pasta@dashboost.org>
2020-08-24 18:16:42 +03:00
PastaPastaPasta
91724d29e6
trivial: clang-tidy changes in privatesend (#3665)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-24 18:15:57 +03:00
PastaPastaPasta
28b7395ec5
trivial: don't mix unsigned int with int (#3664)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-24 18:15:29 +03:00
PastaPastaPasta
7c4e5122cf
trivial: return bool instead of int in CPrivateSendClientOptions (#3660)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-24 18:15:05 +03:00
PastaPastaPasta
0dc2017248
trivial: don't compare pointer to zero (#3659)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-24 18:14:41 +03:00
UdjinM6
81e25e01e0
Print exception origin in crash messages (#3653)
* Print exception origin in crash messages

We use `PrintExceptionContinue` in many places and we pass crash origin to it as a param but we never use it. Also, change the param name to better match its meaning.

* Update src/util.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-14 14:43:22 +03:00
UdjinM6
e86b1ec7ed
Implement a safer version of GetCrashInfoFromException (#3652)
* Implement a safer version of GetCrashInfoFromException

`abi::__cxa_current_exception_type()` can return `null`, handle this properly

* Update src/stacktraces.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Update src/stacktraces.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-14 14:42:42 +03:00
PastaPastaPasta
7725e6fa4b
p2p: remove some old protocol version checks/dead code (#3647)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-14 14:42:15 +03:00
UdjinM6
2429a21b36
Update src/stacktraces.cpp
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-11 12:07:56 +03:00
UdjinM6
d12137b9c2
Fix some translation issues (#3656)
* Avoid translating "PrivateSend"

* Make some strings translatable
2020-08-10 00:37:08 +03:00
dustinface
2f83b6ae25
llmq: Fix spork check in CSigSharesManager::ForceReAnnouncement (#3650)
It seems like the idea here was to avoid announcing already available sigshares for a signhash to everyone if concentrated recovery is enabled. But by returning there if `IsAllMembersConnectedEnabled` equals to `false` we disable the re-announcements prior to the spork activation, where we want to still have them and re-enable if the spork is enabled where we don't want to have them.
2020-08-10 00:36:52 +03:00
Akshay CM
e542c49f70
[RPC] Show address of fundDest when no funds (#3649) 2020-08-10 00:36:38 +03:00
PastaPastaPasta
9f0f388eca
Apply (mostly)trivial clang-tidy in masternode folder (#3646)
* Mostly trivial clang-tidy changes in masternode

Signed-off-by: pasta <pasta@dashboost.org>

* uint -> size_t

Signed-off-by: pasta <pasta@dashboost.org>

* Make GetSyncStatus const not static and ProcessMessage const

Signed-off-by: pasta <pasta@dashboost.org>
2020-08-10 00:35:42 +03:00
PastaPastaPasta
82c3aaaf5f
Apply (mostly)trivial clang-tidy in llmq folder (#3645)
* ixlock -> islock

Signed-off-by: pasta <pasta@dashboost.org>

* Mostly trivial clang-tidy changes in llmq

Signed-off-by: pasta <pasta@dashboost.org>
2020-08-10 00:35:02 +03:00
PastaPastaPasta
96fdd0cfa5
Apply (mostly)trivial clang-tidy in evo folder (#3644)
Signed-off-by: pasta <pasta@dashboost.org>
2020-08-10 00:34:26 +03:00
UdjinM6
d8b676d630
Update src/stacktraces.cpp
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-09 19:28:34 +03:00