e710387ca9 test: Fix bip68 sequence test to reflect updated rpc error message (Ben Woosley)
Pull request description:
The message changed in #12356, but this test is in the extended test suite, so it didn't fail on CI.
Tree-SHA512: ce800e2636ab7bbba7876aa533e1684e75c37a7d2a119f9c4602fd89ac9215e2e28710a1f27feb642b6737ed858da049ebc52fdd476ff4637e3ac3bb1d8399ce
fc1bfcf Update mac_alias to 2.0.7 (Douglas Roark)
deee216 Delete mac_alias patch (Douglas Roark)
Pull request description:
The patch Bitcoin Core has been maintaining for mac_alias was pulled by the mac_alias maintainer in commit 4f31cb084c1c6a8626128b0b00842020b6db9037. Delete the patch and remove the patch from the depends system.
Note that this PR won't be complete until a new version of mac_alias containing the patch has been released, and the depends system is updated to reflect the new version.
Tree-SHA512: e13f1b45c0a56e95645b1aff77036c8a24c29c3f18ea0d386fba8d6d0f5fd07c434afc09dcd644d46ca096d6a7a0d5097f1eca3be5b5a5475eb3d54407044fd9
55f89da1a Don't test against the mempool min fee information in mempool_limit.py (Ben Woosley)
Pull request description:
Because the right-hand side of this comparison can be influenced
externally, e.g. via the -maxmempool argument, the existing mempool state,
host memory usage, etc.
Called out by @MarcoFalke here: https://github.com/bitcoin/bitcoin/pull/12356#discussion_r170094948
Tree-SHA512: 1644cb8046a6953fb93423a5e51af4f5c7d00a35f10389fddd6a823dae6f31ab367b53af70b3b69161adb9c48f57cf4772db7f4610fd7aadd9c0e9b3da17e9f8
bb00c95 Consistently use FormatStateMessage in RPC error output (Ben Woosley)
8b8a1c4 Add test for 'mempool min fee not met' rpc error (Ben Woosley)
c04e0f6 Fix 'mempool min fee not met' debug output (Ben Woosley)
Pull request description:
Output the value that is tested, rather than the unmodified fee value.
Prompted by looking into: #11955
Tree-SHA512: fc0bad47d4af375d208f657a6ccbad6ef7f4e2989ae2ce1171226c22fa92847494a2c55cca687bd5a1548663ed3313569bcc31c00d53c0c193a1b865dd8a7657
6ef86c9 Do not un-mark fInMempool on wallet txn if ATMP fails. (Matt Corallo)
Pull request description:
Irrespective of the failure reason, un-marking fInMempool
out-of-order is incorrect - it should be unmarked when
TransactionRemovedFromMempool fires.
Clean up of #11839, which I think was the wrong fix.
Tree-SHA512: 580731297eeac4c4c99ec695e15b09febf62249237bc367fcd1830fc811d3166f9336e7aba7f2f6f8601960984ae22cebed781200db0f04e7cd2008db1a83f64
2f960b5 [wallet] Indent only change of CWallet::AvailableCoins (João Barbosa)
1beea7a [wallet] Make CWallet::ListCoins atomic (João Barbosa)
Pull request description:
Fix a potencial race in `CWallet::ListCoins`.
Replaces `cs_main` and `cs_wallet` locks by assertions in `CWallet::AvailableCoins`.
Tree-SHA512: 09109f44a08b4b53f7605d950ab506d3f748490ab9aed474aa200e93f7b0b9f96f9bf60abe1c5f658240fd13d9e3267c0dd43fd3c1695d82384198ce1da8109f
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)
Pull request description:
There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.
- `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (#11031)
- the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (#10858)
- providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (#11415)
- The return format from `addmultisigaddress` has changed (#11415)
`getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after #11739 and #11398 have been merged and the segwit test code tidied up)
Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
90ba2df11 Fix missing cs_main lock for GuessVerificationProgress() (Jonas Schnelli)
Pull request description:
`GuessVerificationProgress()` needs `cs_main` due to accessing the `pindex->nChainTx`.
This adds a `AssertLockHeld` in `GuessVerificationProgress()` and adds the missing locks in...
* `LoadChainTip()`
* `ScanForWalletTransactions()` (got missed in #11281)
* GUI, `ClientModel::getVerificationProgress()` <--- **this may have GUI performance impacts**, but could be relaxed later with a cache or something more efficient.
Tree-SHA512: 13302946571422375f32af8e396b9d2c1180f2693ea363aeba9e98c8266ddec64fe7862bfdcbb5a93a4b12165a61eec1e51e4e7d7a8515fa50879095dc163412
9ad6746ccd Use static_cast instead of C-style casts for non-fundamental types (practicalswift)
Pull request description:
A C-style cast is equivalent to try casting in the following order:
1. `const_cast(...)`
2. `static_cast(...)`
3. `const_cast(static_cast(...))`
4. `reinterpret_cast(...)`
5. `const_cast(reinterpret_cast(...))`
By using `static_cast<T>(...)` explicitly we avoid the possibility of an unintentional and dangerous `reinterpret_cast`. Furthermore `static_cast<T>(...)` allows for easier grepping of casts.
For a more thorough discussion, see ["ES.49: If you must use a cast, use a named cast"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es49-if-you-must-use-a-cast-use-a-named-cast) in the C++ Core Guidelines (Stroustrup & Sutter).
Tree-SHA512: bd6349b7ea157da93a47b8cf238932af5dff84731374ccfd69b9f732fabdad1f9b1cdfca67497040f14eaa85346391404f4c0495e22c467f26ca883cd2de4d3c
7444149 Document method for reviewers to verify chainTxData (John Newbery)
Pull request description:
This commit adds the final block hash of the window to getchaintxstats
and documents how reviewers can verify changes to chainTxData.
Tree-SHA512: d16abb5f47d058e52660f4d495f1e453205b1b83716d7c810ff62a70338db721386c1808ec1fc8468f514e4d80cc58e3c96eeb3184cbbcb1d07830fa5e53f342
7f968ae107 doc: Explain how to update chainTxData in release process (Wladimir J. van der Laan)
Pull request description:
Adds a short explanation how to update chainTxData to the release process. Mention where to get the data, and link to an example.
Tree-SHA512: 66b0eb12a25afb7b1da0788c8f9f9701d566cb7ce55899402440a57bef0e177b55e926442d3c8aa482299abe7c48ab94735d501c37f0a11fefb86e2fc2e33d9b
5bdbbdc Refactor HaveKeys to early return on false result (João Barbosa)
Pull request description:
This consists in a trivial change where the return type of `HaveKeys()` is now `bool` meaning that it returns whether all keys are in the keystore, and early returns when one isn't.
Tree-SHA512: 03e35ea8486404b84884b49f6905c9f4fc161a3eeef080b06482d77985d5242a2bdd57a34b8d16abe19ee8c6cfa3e6fbcb935c73197d53f4cd468a2c7c0b889b
bdb3231 Implements a virtual destructor on the BaseRequestHandler class. (251)
Pull request description:
Granted that there is no undefined behavior in the current implementation, this PR implements a virtual destructor on the BaseRequestHandler class to protect against undefined behavior in the event that an object of a potential future derived BaseRequestHandler class with a destructor is destroyed through a pointer to this base class.
This PR also fixes "_warning: delete called on 'BaseRequestHandler' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]_" warnings in environments where the project is built with the `-Wsystem-headers` flag; or environments where the `-Wdelete-non-virtual-dtor` diagnostics flag fires from system headers.
Tree-SHA512: 3c3b0797a8dbce8d8c5b244709e8bca41c4e28d5ba554a974bf7fc9128413e1098c457a00e51b21154ce6c11ce5da3071626e71d593b2550d0020bc589406eed
c409b1adac [rpc] Reduce scope of cs_main and cs_wallet locks in listtransactions (João Barbosa)
Pull request description:
Trivial change, no behaviour change.
Benchmark done as follow:
- run with `-regtest`
- wallet with 5000 transactions
- measured the time spent with the lock and the total time
- times are an average of 100 `listtransactions --count=...` calls
| `--count` | lock (ms) | total (ms) | saving |
|--:|--:|--:|--:|
| 10 | 0.2230 | 0.2510 | 11% |
| 100 | 2.5150 | 2.8690 | 12% |
| 1000 | 20.0320 | 23.3490 | 14% |
| 10000 | 105.2070 | 125.5310 | 16% |
Tree-SHA512: ebedfeeb4c8ad75c89128e53cae976a82967dbb5ffd129da0f7204ccf9c3c15070b3d509f3767bebd745512e410200cc546147c836e82409f95fc9b8d14fc3ed
* Make internalId private to make sure it's set/accessed properly
* evo: Make internalId only accessible by the constructor
* Tweak constructors
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* Drop dead code in DoInvalidateBlock
* Let ActivateBestChain skip SyncWithValidationInterfaceQueue when called from IS or CL threads
* Use CL's own scheduler instead of a global one
* Revert "Let ActivateBestChain skip SyncWithValidationInterfaceQueue when called from IS or CL threads"
This reverts commit 1c9f6da50a.
* Return invalid state for GetTxPayload failures instead of asserting
* Throw an error when internal `find` fails instead of asserting
* Unify mnlist checks for lists created from blocks and lists created via updates of older lists with diffs
* Wrap evo block processing in try..catch to make sure all earlier introduced throws are caught
* evo/llmq: Adjust reject reasons for CFinalCommitmentTxPayload
In CheckLLMQCommitment this reject string was used so i adjusted the
other one in CQuorumBlockProcessor::GetCommitmentsFromBlock and the new
introduced in PR #3506
* return state.DoS instead of asserting in cbtx.cpp
Signed-off-by: pasta <pasta@dashboost.org>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: pasta <pasta@dashboost.org>
* qt: Updated loadStylesheet and added general.css for shared styles
* qt: Customized QRadioButton and QCheckBox
- Introduced new images for QCheckBox and QRadioButton
- Make use of Hover/Pressed/Disabled/Indeterminate states
- Use customized Checkboxes and Radio-Buttons in CoinControlWidget
* qt: Removed qtreeview_selected image
This looks weird in the dark theme. Will introduce new arrows here.
* qt: Redesigned arrows and their usage
- Added new arrow images
- Make use of Hover/Pressed/Disabled states for QAbstractSpinBox and
QComboBox
- Use custom arrows in QHeaderView
- Use custom arrows in QTreeWidget branch selectors
* qt: Slightly increased checkboxes and radio buttons
* qt: Move the scrollbars css loading into loadStyleSheet
This way all windows will have the same scrollbars and not only the main
window.
* qt: Use padding instead of margin for QTreeWidget::branch styles
Use of margin here lead to a 2px vertical line at the left edge cause of
the background below.
* qt: Use border-image for the scrollbar arrows and adjust the size.
background-image lead to not showing the arrows here because it
obviously was scaled incorrect with the higher resolution of the image
files.
* qt: Add missing grey arrows and make use of disabled states of scrollbar arrows
* qt: Adjust dashThemeActive and also use it in BitcoinGUI::createToolBars
* qt: Fixed copyright year in general.css
d894894 wallet: Refactor to WalletInitInterface* const g_wallet_init_interface (João Barbosa)
39bc2fa wallet: Make WalletInitInterface and DummyWalletInit private (João Barbosa)
Pull request description:
Implementations of `WalletInitInterface` don't have to be public, so make them private. This makes the interface instantiation static. Also reduces `ENABLE_WALLET` usage and removes the unnecessary `src/wallet/init.h` header.
Tree-SHA512: 203c49d8c85252d1bd0ff1d7ed8bcdc842d12d2d396e965cc70be5c8159a62e98ec23d32d2f3dc48a53e575844130d0a7dedac3cc2fe4621d31319b7a1c9ba89
Signed-off-by: pasta <pasta@dashboost.org>
# Conflicts:
# src/qt/dash.cpp
# src/wallet/init.cpp
# src/wallet/init.h
# src/walletinitinterface.h
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
* Split -privatesenddenoms option into two to be able to specify initial/batched denom "checkpoint" and the hard cap
* Introduce MAX_PRIVATESEND_DENOM_OUTPUTS = 500 constant
Also make sure to never exceed it while looping
* Make sure to never exceed nPrivateSendDenomsBatched while creating batches
* Tweak debug logging
* Use auto for nDenomValue
* Fix detection of so called "final" denom
Now that we don't skip denoms anymore conditions are slightly different. Without this fix the "final" denom is created in a separate tx even when there is enough room in the current one.
* batched -> goal
* Tweak json and a warning
* Drop excessive checks for MAX_PRIVATESEND_DENOM_OUTPUTS in the "goal" part of the algo
Rename it to PRIVATESEND_DENOM_OUTPUTS_THRESHOLD to beter match the meaning and tweak comments
* fix log
* wallet: Add MAX_COIN_TYPE to CoinTypes to allow dynamic range checks
* rpc: Add coinType to the queryOptions object of listunspent rpc command
This allows to filter the output by CoinType:
0 -> ALL_COINS
1 -> ONLY_FULLY_MIXED
2 -> ONLY_READY_TO_MIX
3 -> ONLY_NONDENOMINATED
4 -> ONLY_1000
5 -> ONLY_PRIVATESEND_COLLATERAL
* wallet/rpc: Rename CoinType ONLY_1000 to ONLY_MASTERNODE_COLLATERAL
Make it more obvious what ONLY_1000 is in the description of the
listunspent command.
* wallet/rpc: Formatting only
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* wallet: Add MIN_COIN_TYPE to CoinTypes
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* rpc: Check the lower boundary of CoinType in listunspent's queryOptions
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Merge #11415: [RPC] Disallow using addresses in createmultisig
1df206f Disallow using addresses in createmultisig (Andrew Chow)
Pull request description:
This PR should be the last part of #7965.
This PR makes createmultisig only accept public keys and marks the old functionality of accepting addresses as deprecated.
It also splits `_createmultisig_redeemscript` into two functions, `_createmultisig_getpubkeys` and `_createmultisig_getaddr_pubkeys`. `_createmultisig_getpubkeys` retrieves public keys from the RPC parameters and `_createmultisig_getaddr_pubkeys` retrieves addresses' public keys from the wallet. `_createmultisig_getaddr_pubkeys` requires the wallet and is only used by `addwitnessaddress` (except when `createmultisig` is used in deprecated mode).
`addwitnessaddress`'s API is also changed. Instead of returning just an address, it now returns the same thing as `createmultisig`: a JSON object with two fields, address and redeemscript.
Tree-SHA512: a5796e41935ad5e47d8165ff996a8b20d5112b5fc1a06a6d3c7f5513c13e7628a4fd37ec30fde05d8b15abfed51bc250710140f6834b13f64d0a0e47a3817969
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* Dashify
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
* Allow the creation of denoms on regtest.
Ignore the fact there are no MNs on regtest
Signed-off-by: pasta <pasta@dashboost.org>
* implement significantly improved createdenominations algorithm
Signed-off-by: pasta <pasta@dashboost.org>
* change int denomsToCreate
Signed-off-by: pasta <pasta@dashboost.org>
* Remove debugging code and use a const iterator instead of calling find multiple times
Signed-off-by: pasta <pasta@dashboost.org>
* vecDenominationsSkipped and *DenomSkipped are nolonger used
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
* inputs -> outputs
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* #3241 change PrivateSend and balance location
* include resource location back
* change back balance and privatesend checkbox position
* add new PrivateSend tab on main window and PrivateSend tray option
* adjust code formating
* revert QT TODO
* Update src/qt/forms/sendcoinsdialog.ui code formating
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* code formating update
* clear send dialog and remove unnecessary warning
* change clear location for better UX and performance
* remove variable used in warning
* Do not clear everything, simply unselect non-fully-mixes coins instead
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Warn about unselected coins
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Disable PrivateSend tab/menu item when PrivateSend is disabled
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* fix tab selection bold font
* fix use available balance for PS
* change back line
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Introduce ONLY_PRIVATESEND coin type to select fully mixed coins only
Note: ONLY_DENOMINATED will NOT return fully mixed coins now
* Remove useless check
* Rename coin types to better match the meaning
ONLY_DENOMINATED -> ONLY_READY_TO_MIX
ONLY_PRIVATESEND -> ONLY_FULLY_MIXED
* Drop another two unnecessary checks
* qt: Allow and process URIs pasted to the payTo field of SendCoinsEntry
* qt: Prevent double invocation of the textChanged slot when pasting an URI
* qt: Keep the addressbook's label if there is already one for the address
If there is no label for the given address in the addressbook but the
URI contains a label it will use the URI's label to update the
addressbook.
* qt: Always prefer the addressbook's label over an URI's label
* Merge #12384: [Docs] Add version footnote to tor.md
39d2911 [Docs] Add version footnote to tor.md (Damian Williamson)
Pull request description:
[Docs] Add version footnote to tor.md
Added note to section 2, part -edits to `/etc/tor/torrc`- indicating this is only required for Tor version 0.2.7.0 and older, since section 3 states it is valid for Tor version 0.2.7.1 and newer. Added ref link from section 2 version footnote to section 3. Re-styled headings to work on GitHub -alternate heading style markup creation issue with numbered headings and thus headings and automatic heading links are broken-
Ref: [Issue# 12376](https://github.com/bitcoin/bitcoin/issues/12376)
Signed-off-by: Damian Williamson \<willtech@live.com.au\>
Tree-SHA512: 439f4ccc3e196011af448b220adf26b0e653ac589bf4cfbbc276c1500c9d08f209c9d6101e4d232857779d9f25164cfb222ed30e3d63de116f9121e6ebde31c3
Signed-off-by: pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
* bitcoin -> Dash Core
Signed-off-by: Pasta <pasta@dashboost.org>
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Replaced request.params[5] with txidFee, cause the param could be null at that index when the submit type is a masternode trigger, triggering a JSON parsing error (expected str, got null).
* llmq: Add more information to the result of CFinalCommitment::ToJson
Example output:
```
{
"version": 1,
"llmqType": 1,
"quorumHash":
"000002a20a35757fc467f0ebe8663f76e4c5df74411cc5f1735cfd92278071fe",
"signersCount": 49,
"signers": "03fbffffffffff",
"validMembersCount": 49,
"validMembers": "03fbffffffffff",
"quorumPublicKey":
"8db1108b50dd741076b577f6798f0bf382ca4d11dafd55ed14aaaf613f604aa55bf1da1f0469f75105376e440381ee23",
"quorumVvecHash":
"feedb15d5a7ca25a68d9c51036973d37925d8439d4769d7dd7bace7440089071",
"quorumSig":
"1879f6260ef427dc9542088b39e02a8e73e34c0484269cbc12108ab991d438f81e5be80a5b4b5595b6634113fdf060060c8fe190677627fb2d25f6e052c7f93598d36dd415f8f84c693c6a5943098616a1e135522852d8f572bb6e1470df4a94",
"membersSig":
"8ef7d881fcc1e8111dd82c556ab62dad56ea5ecb47a9ac067eb2057d92d27e39530630a7f77d19adc857d33eb485a1b601b2d78ac4c73742f2036089bfb1f25441f1dfcd3cfd1eed6e7d664c0e97bf75b7d7097ebd647791fbcef070fe3e3e91"
}
```
* llmq: Changed the byte order in ToHexStr(const std::vector<bool>& vBits)
* 🪲 improve evodb consistency recovering from dbcrash
* Adjust the fix
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Fix it
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Disable recovery from a crash during a fork and a corresponding part of dbcrash.py
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Skip some checks in CQuorumBlockProcessor when replaying blocks after the crash
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Process special txes in RollforwardBlock
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Update src/init.cpp
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
* Refactor and fix GetRealOutpointPrivateSendRounds
Changes:
- streamline logic
- use much more compact/direct map to store outpoint rounds
- per-wallet map instead of a static one
- hold cs_wallet
* Bail out early if one of outputs in the same tx is a non-denom one
Changes in behaviour:
- unlock coins, return keys to keypool and set state POOL_STATE_ERROR on error, reset session on timeout later
- drop POOL_STATE_SUCCESS (wasn't really used)
Due to not disconnecting the signal there the trace of the `loadwallet`
rpc command ends
in a call of `SplashScreen::ConnectWallet` for the not longer existent
splashscreen object.
7770a7da95/src/wallet/wallet.cpp (L4192)
Wasn't an issue before the `loadwallet` rpc was introduced because
`CWallet::LoadWallet` was only called once on startup.