Commit Graph

156 Commits

Author SHA1 Message Date
PastaPastaPasta
5074e6df9e
Extensive include refactoring (#4095)
* Simple changes, mostly just includes

* Continued include changes combined with using pointers to avoid including more than necessary in headers

* remove dup include

* masternode-utils.cpp include net.h in all builds

* resolve linter -7 +11

* drop quorums.h from dkgsessionhandler.cpp

* Add `<utilstrencodings.h>`

* Initialize lastMNListForVotingKeys

* Refactor GetMinedCommitment to return sharedptr

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-15 23:41:16 -04:00
dustinface
a3cc51118e
Merge #13063: Use shared pointer to retain wallet instance (#4076)
80b4910f7d87983f50047074c3c2397b0a5c4e92 wallet: Use shared pointer to retain wallet instance (João Barbosa)

Pull request description:

  Currently there are 3 places where it makes sense to retain a wallet shared pointer:
   - `vpwallets`;
   - `interfaces::Wallet` interface instance - used by the UI;
   - wallet RPC functions - given by `GetWalletForJSONRPCRequest`.

  The way it is now it is possible to have, for instance, listunspent RPC and in parallel unload the wallet (once #13111 is merged) without blocking. Once the RPC finishes, the shared pointer will release the wallet.

  It is also possible to get all existing wallets without blocking because the caller keeps a local list of shared pointers.

  This is mostly relevant for wallet unloading.

  This PR replaces #11402.

Tree-SHA512: b7e37c7e1ab56626085afe2d40b1628e8d4f0dbda08df01b7e618ecd2d894ce9b83d4219443f444ba889096286eff002f163cb0a48f37063b62e9ba4ccfa6cce

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-04-01 13:28:43 -04:00
PastaPastaPasta
5c485c5b0b
refactor: Move CCoinJoinClientOptions from coinjoin-client.* (#4066)
* create coinjoin-client-options.cpp/.h

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

* Drop redundant forward declarations

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-27 04:11:33 +01:00
UdjinM6
00d237f98f
Add/fix/tweak translated strings (#4052)
* wallet: translate some dash specific warnings

* transaction type: "CoinJoin Denominate" -> "CoinJoin Mixing"

* transaction type: "CoinJoin" -> "CoinJoin Send"

* Avoid translating "CoinJoin"

* Move the link to CoinJoin doc out of the translated string

* Remove trailing whitespace

* Apply suggestions from code review

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

* Update src/wallet/test/wallet_tests.cpp

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

* Update src/coinjoin/coinjoin.cpp

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
2021-03-24 13:13:25 +03:00
PastaPastaPasta
a565437849
refactor: move some protocol constants (#4022)
* governance/net: move protocol constants into version.h, drop GOVERNANCE_FILTER_PROTO_VERSION

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

* drop GOVERNANCE_FILTER_PROTO_VERSION

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

* move MIN_COINJOIN_PEER_PROTO_VERSION into version.h and adjust includes accordingly

Signed-off-by: pasta <pasta@dashboost.org>
2021-03-19 11:11:41 +03:00
dustinface
ae506bae66
refactor: PrivateSend -> CoinJoin + Move the tab (#4038)
* qt|wallet|privatesend: Rename PrivateSend to CoinJoin in GUI strings

* qt: Move CoinJoin next to Transactions

* qt: Adjust status tip of privateSendCoinsMenuAction

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

* rename: privateSend -> coinJoin

* rename: privatesend -> coinjoin

* rename: PrivateSend -> CoinJoin

* rename: use_ps -> use_cj

* rename: PRIVATESEND -> COINJOIN

* rename: privatesend -> coinjoin for files and folders

* refactor: Re-order coinjoin files in cmake/make files

* refactor: Re-order coinjoin includes where it makes sense

* test: Update lint-circular-dependencies.sh

* Few cleanups

* test: test/coinjoin_tests.cpp -> wallet/test/coinjoin_test.cpp

* s/AdvancedPSUI/AdvancedCJUI/g

* s/privateSentAmountChanged/coinJoinAmountChanged/g

* wallet: Rename "ps_salt" backwards compatible

* Minimal PrivateSend -> CoinJoin migration for settings and cmd-line

* wallet: Fix privatesendrounds -> coinjoinrounds migration

* qt: Migrate nPrivateSendAmount -> nCoinJoinAmount

* `-coinjoindenoms` never existed

* Migrate all PS options/settings

* rpc: Formatting only

* qt: Make Send/CoinJoin tabs a bit more distinguishable

Co-authored-by: thephez <thephez@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-17 18:36:11 -04:00