Commit Graph

14699 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
8179bd5316 Merge #15985: Add test for GCC bug 90348
58e291cfa Add test for GCC bug 90348 (Pieter Wuille)

Pull request description:

  This adds a test for GCC bug 90348 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348), using a test case extracted from our own `sha256d64` test in crypto_tests.cpp, which was failing on some platforms.

  This is based on top of #15983 to make sure the bug doesn't trigger (it does in some Travis configurations without it).

ACKs for commit 58e291:

Tree-SHA512: 4dc9084e92dd143a53930e42bb68e33d922a2a2b891406b259d3a0bed4511dcc49e7447a7a8e4eb793a26e3eacb188ca293b71e0e061f9b3230f8e7fcfd29525
2021-11-09 14:08:50 -05:00
Wladimir J. van der Laan
5d12f44d55 Partial Merge #16144: wallet: do not encrypt wallets with disabled private keys
7860c98bd wallet: do not encrypt wallets with disabled private keys (whythat)

Pull request description:

  Fix for #15635.
  Throw an `RPC_WALLET_ENCRYPTION_FAILED` error when attempting to encrypt wallet with disabled private keys. Changed `test/function/wallet_createwallet.py` to test new behavior.

ACKs for commit 7860c9:
  achow101:
    utACK 7860c98bd59cd8f56e9b2b4ae45265c046e7cfd9
  meshcollider:
    utACK 7860c98bd5

Tree-SHA512: d0cc40efd303a00d0b4d3cb2de59d8d2d7dd35647e7f3fe9d4a8986589499c1f567c5780c83a129e1ab8dbe601279c459c6ebce3b48b1d81d47a28616ef4a369
2021-11-09 14:08:49 -05:00
Wladimir J. van der Laan
5974914031 Merge #16090: Qt: Add vertical spacer to peer detail widget
36b0a2f2a6b49008c4f37866a9e3ab702eb34eda Add vertical spacer (Josu Goñi)

Pull request description:

  Before:

  ![image](https://user-images.githubusercontent.com/25986871/58375408-a8f22c80-7f52-11e9-96ca-14f2186e6fa7.png)

  After:

  ![image](https://user-images.githubusercontent.com/25986871/58375420-fa022080-7f52-11e9-8add-eafe98068e8d.png)

ACKs for commit 36b0a2:
  fanquake:
    utACK 36b0a2f2a6
  hebasto:
    tACK 36b0a2f2a6b49008c4f37866a9e3ab702eb34eda on Linux Mint 19.1, Qt 5.9.5
  fanquake:
    re-utACK 36b0a2f2a6
  kristapsk:
    ACK 36b0a2f2a6b49008c4f37866a9e3ab702eb34eda (tested with Qt 5.11.3 under Linux/Xfce4)
  promag:
    Tested ACK 36b0a2f2a6 on macos 10.14.3. Resizing the window works as expected.

Tree-SHA512: 26ec9700aa9116ec2c604f8ec7b825b30c83c1d497c21f2191d3585868db4a2e3921de607dea9f7cd9a1ea49361215d738e2aba1936566d85757d87112d73088
2021-11-09 14:08:49 -05:00
Kittywhiskers Van Gogh
0a760bb809
merge bitcoin#8365: Treat high-sigop transactions as larger rather than rejecting them (#4562) 2021-11-08 21:43:24 +03:00
PastaPastaPasta
d4910cab3b
Merge pull request #4323 from kittywhiskers/net
merge bitcoin 15246, 15330, 15697, 16445, 16202, 16562, 18260, 22331, 23271, 16493, 17931: Refactor network message deserialization
2021-11-03 15:40:14 -04:00
UdjinM6
cb7efbf825
Merge pull request #4561 from PastaPastaPasta/develop-trivial-2021-10-30
backport trivial 2021 10 30
2021-11-03 19:28:09 +03:00
MarcoFalke
2d30d33811
Merge #21125: test: Change BOOST_CHECK to BOOST_CHECK_EQUAL for paths
059e8ccc1eba6cd92f4c434325cb56b0533eb744 Change BOOST_CHECK to BOOST_CHECK_EQUAL to see mismatched values when a check fails. (Kiminuo)

Pull request description:

  This is useful to see mismatched values when a check fails as specified in the [Boost documentation](https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref/assertion_boost_level.html).

  This PR would make #20744 PR's diff smaller by a bit.

ACKs for top commit:
  MarcoFalke:
    review ACK 059e8ccc1eba6cd92f4c434325cb56b0533eb744
  theStack:
    Code Review ACK 059e8ccc1eba6cd92f4c434325cb56b0533eb744

Tree-SHA512: 82359ef38e0d1926f12a34aeff6fde6d1d307c703a080547749b908f873c2a2f894f6f094c33470b32987c229e3a1f17f7d1e877663c53293c023bde0e7272c1
2021-11-03 12:24:06 -04:00
MarcoFalke
bdb1a55c0b
Merge #19088: validation: use std::chrono throughout some validation functions
789e9dd3aa727176797529c35b2848f994630a82 validation: use std::chrono in IsCurrentForFeeEstimation() (fanquake)
47be28c8bc475eafeebd4fc58ea92f0d3df0d8c6 validation: use std::chrono in CChainState::FlushStateToDisk() (fanquake)

Pull request description:

  Probably up for debate as to which type is used for the constants. Personally, swapping these to hours is more readable.

ACKs for top commit:
  MarcoFalke:
    ACK 789e9dd3aa727176797529c35b2848f994630a82
  jonatack:
    ACK 789e9dd3aa727176797529c35b2848f994630a82

Tree-SHA512: f4a25cbd00a49a54b7783a1f588be83706dd2a475cecb5c2e8b97b2d4b27c0955a7454d7486f2454e96351c44f233b300c4f4b9ca62fc7336277f10da34dd5c3
2021-11-03 12:24:06 -04:00
Wladimir J. van der Laan
38a0fbee54
Merge #17220: tests: Add unit testing for the CompressScript function
b05ec410f2d9f209796a5df31860e23efd729dfe Add unit testing for the CompressScript functions (marcaiaf)

Pull request description:

  Salvaging #15104 which adds unit tests for CompressScript function in `compressor.cpp`

  Tested following cases for the CScript:
    - CKeyID
    - CScriptID
    - Uncompressed CPubKey (of size: 65)
    - Compressed CPubKey (of size: 32)

ACKs for top commit:
  theStack:
    ACK b05ec410f2

Tree-SHA512: 7e23ace39383122802dfe5f7d38190d772f5db4045a67b7a9bd4c06797a17e0cdc41d6fac92d448057eb7df50172155dc824587c16c68c79fd1a4de37b772001
2021-11-03 12:24:05 -04:00
Wladimir J. van der Laan
29f354e8ec
Merge #17059: util: Simplify path argument for CBlockTreeDB ctor
c2bb3919a8cc52ea35d424c1f31f9474f1ea4911 util: Simplify path argument for CBlockTreeDB ctor (Hennadii Stepanov)

Pull request description:

  This PR:
  - simplifies path argument (`datadir/blocks/index`) for `CBlockTreeDB`  constructor
  - does not change behavior as `GetBlocksDir()` with unset "-blocksdir" returns the same path
  - improves code readability

ACKs for top commit:
  MarcoFalke:
    ACK c2bb3919a8cc52ea35d424c1f31f9474f1ea4911
  laanwj:
    ACK c2bb3919a8cc52ea35d424c1f31f9474f1ea4911
  promag:
    ACK c2bb3919a8cc52ea35d424c1f31f9474f1ea4911.

Tree-SHA512: 646a0a3a31e2f419b05f696cbdfb7d8987f1d89ec0797b72464ae05680fd5f95f6469be0ea5b56f772434c49d48504cd9cf9760c05d4054d11349d502e157ee2
2021-11-03 12:24:05 -04:00
Samuel Dobson
d33c4791f8
Merge #16830: refactor: wallet: Cleanup walletinitinterface.h
4be3b7680e6324294d9241232a6f1eae36c85a9e refactor: Cleanup walletinitinterface.h (Hennadii Stepanov)

Pull request description:

  Forward declarations of `CScheduler` and `CRPCTable` classes are no longer needed after ea961c3d7256c66146b4976ab1293db4a628c0de (#14437) commit.

  Including `<string>` is no longer needed after 4d4185a4f0e40c033a587871839a47cb3f89ee93 (#13190) commit.

ACKs for top commit:
  theStack:
    ACK 4be3b76
  promag:
    ACK 4be3b7680e6324294d9241232a6f1eae36c85a9e.
  kristapsk:
    ACK 4be3b7680e6324294d9241232a6f1eae36c85a9e (tested that it builds)

Tree-SHA512: 5ed72e3deda3d7c7fb698a1a11db76199727e6c570dfc78422690dbda9a92af32e1913920062dd3c9f618095e7498c219ff9c145a4c151486865ebeaa20a1d3c
2021-11-03 12:24:05 -04:00
Wladimir J. van der Laan
0cb1a9d39f
Merge #16563: test: Add unit test for AddTimeData
7cd069d8ef900c6c6b904ddd6fbd64e14bd0f53e Add test for AddTimeData (Martin Zumsande)

Pull request description:

  `AddTimeData()` has poor test coverage but interesting logic (including a bug turned into a feature). This PR adds a unit test for it.

ACKs for top commit:
  laanwj:
    ACK 7cd069d8ef900c6c6b904ddd6fbd64e14bd0f53e, thanks for adding a test

Tree-SHA512: 8228f9027e52ed534411d595c7e45cf4edeee9757f26f5141fbcfae3fc6f598a8cea7f734bb8f55238857a37ad2f2d518e859e1fe8c106c0712da976792ac132
2021-11-03 12:24:04 -04:00
UdjinM6
1ff4e7599c
Merge pull request #4537 from PastaPastaPasta/backport-14711
Backport 14711, 15342, partial 15855
2021-11-03 17:12:31 +03:00
Kittywhiskers Van Gogh
bb30e9f007 merge bitcoin#23271: Fix K1/K2 use in the comments in ChaCha20-Poly1305 AEAD 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
df06dfa435 merge bitcoin#22331: Fix K1/K2 use in ChaCha20-Poly1305 AEAD 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
d949c90bc0 merge bitcoin#18260: Fix implicit value conversion in formatPingTime 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
31cdcb64b8 merge bitcoin#16562: Refactor message transport packaging 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
c0d4df0a06 merge bitcoin#16202: Refactor network message deserialization
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-11-03 10:45:00 +05:30
MarcoFalke
0bc782dfcb
partial Merge #15855: [refactor] interfaces: Add missing LockAnnotation for cs_main
fa3c651143 [refactor] interfaces: Add missing LockAnnotation for cs_main (MarcoFalke)

Pull request description:

  This adds missing `LockAnnotation lock(::cs_main);` to `src/interfaces/chain.cpp` (as well as tests and  benchmarks)

ACKs for commit fa3c65:
  practicalswift:
    utACK fa3c6511435149782545ac0d09d4722dc115d709
  ryanofsky:
    utACK fa3c6511435149782545ac0d09d4722dc115d709

Tree-SHA512: b67082fe3718c94b4addf7f2530593915225c25080f20c3ffa4ff7e08f1f49548f255fb285f89a8feff84be3f6c91e1792495ced9f6bf396732396d1356d597a
2021-11-02 23:49:10 -04:00
MarcoFalke
dfa040e9b9
Merge #15342: Suggested wallet code cleanups from #14711
aebafd0edf Rename Chain getLocator -> getTipLocator (Russell Yanofsky)
2c1fbaa771 Drop redundant get_value_or (Russell Yanofsky)
84adb206fc Fix ScanForWalletTransactions start_block comment (Russell Yanofsky)
2efa66b464 Document rescanblockchain returned stop_height being null (Russell Yanofsky)
db2d093233 Add suggested rescanblockchain comments (Russell Yanofsky)
a8d645c934 Update ScanForWalletTransactions result comment (Russell Yanofsky)
95a812b599 Rename ScanResult stop_block field (Russell Yanofsky)

Pull request description:

  This implements suggested changes from #14711 review comments that didn't make make it in before merging.

  There are no changes in behavior in this PR, just documentation updates, simplifications, and variable renames.

Tree-SHA512: 39f1a5718195732b70b5e427c3b3e4295ea5af6328a5991763a422051212dfb95383186db0c0504ce2c2782fb61998dfd2fe9851645b7cb4e75d849049483cc8

# Conflicts:
#	src/interfaces/chain.cpp
#	src/qt/test/wallettests.cpp
#	src/wallet/test/wallet_tests.cpp
#	src/wallet/wallet.cpp
2021-11-02 23:49:09 -04:00
MeshCollider
48826b429d
Merge #14711: Remove uses of chainActive and mapBlockIndex in wallet code
44de1561a Remove remaining chainActive references from CWallet (Russell Yanofsky)
db21f0264 Convert CWallet::ScanForWalletTransactions and SyncTransaction to the new Chain apis (Russell Yanofsky)
2ffb07929 Add findFork and findBlock to the Chain interface (Russell Yanofsky)
d93c4c1d6 Add time methods to the Chain interface (Russell Yanofsky)
700c42b85 Add height, depth, and hash methods to the Chain interface (Russell Yanofsky)

Pull request description:

  This change removes uses of `chainActive` and `mapBlockIndex` globals in wallet code. It is a refactoring change which does not affect external behavior.

  This is the next step in the larger #10973 refactoring change, which removes all other accesses to node global variables from wallet code. Doing this is useful to provide a better defined interface between the wallet and node, and necessary to allow wallet and node code to run in separate processes in #10102.

Tree-SHA512: 4dcec8a31c458f54e2ea6ecf01e430469b0994c5b41a21a2d150efa67cd209f4c93ae210a101e064b3a87c52c6edfc70b070e979992be0e3a00fd425de6230a8
2021-11-02 23:49:09 -04:00
Kittywhiskers Van Gogh
13e26024c4 merge bitcoin#17095: Filter control characters out of log messages 2021-11-01 21:42:49 +05:30
Kittywhiskers Van Gogh
6db0332d14 merge bitcoin#17427: Fix missing qRegisterMetaType for size_t 2021-11-01 21:41:35 +05:30
Kittywhiskers Van Gogh
8278e8ab0f merge bitcoin#17135: Make polling in ClientModel asynchronous 2021-11-01 21:41:35 +05:30
Kittywhiskers Van Gogh
e13d93ec78 merge bitcoin#16566: refactor upper/lowercase functions 2021-11-01 21:41:35 +05:30
PastaPastaPasta
2204c85370
governance: Implement reduced governance fee (#4241)
* Implement hf for reduced governance fee

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

* update VersionBitsDeploymentInfo

* Adjust activation times for gov fee hard fork

* Use raw timestamps

* Adjust timestamps

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-11-01 18:31:48 +03:00
UdjinM6
12c399b3f0
Merge pull request #4554 from UdjinM6/bp15402_16849_15971
backport 15402, 16849, 15971
2021-11-01 18:26:11 +03:00
UdjinM6
bbe9b3d1e0
Merge pull request #4494 from kittywhiskers/descaddr
merge bitcoin#14150, #14477, #14646, #14667, #14886, #14565, #14491, #15368: descriptors
2021-11-01 18:25:32 +03:00
PastaPastaPasta
ea4bd7193a
minor refactoring after #4351 (#4556) 2021-11-01 13:30:18 +03:00
Stefan
f0d49e4f69
Qt: Adds Governance tab (#4351)
* Qt: Adds settings option to showGovernanceTab

* Qt: Adds not-yet-functional Governance tab to UI

* library: adds hook into governance rom node interface

* Qt: WIP: puts CGovernanceObject hashes on Governance tab

WIP: basically ready to be filled out, most of the infra in place
now.

* Qt: Populates Governance table values

Governance table now contains real values for current columns. Display
columns may potentially change.

- want url in table if right click option opens url?
- What set of cols wanted? Show yes/no votes?
- Decide refresh functionality.
- Do we even want filter func? (checkbox show: proposal, trigger, active coming)

* qt: Shows Voting Status on Governance page

Towards DMT like Governance page, now shows voting status, but needs to
look at super blocks to determine if proposal period has passed and show
final funded or unfunded for past proposals.

* Qt: refactor governance tab to use Model-View arch

Refactors the QT Governance tab to use a Model-View architecture. The
list of Proposals is stored in a QAbstractItemModel, and a QTableView is
used to display.

This makes a much cleaner separation of concerns in the implementation.
Also, can now use the QSortFilterProxyModel to get responsive filtering.
Less internal state inside the GovernanceList, critical sections
removed.

- Needs update loop implemented.
- Needs Proposal detail widget implemented.

* qt: adds periodic update to gov proposal list

Periodically update list of governance related proposals.

* qt: populates governancelist voting status column

* qt: governancelist Porposal shows extra info on doubleClick

* qt: governancelist: reorder .cpp impl to match .h

* qt: governancelist: fixup based on CI

- Adds LOCK(cs_main) for call to pGovObj->IsValidLocally.
- retab, removes trailing whitespace in governancelist.{cpp,h}

* qt: clang-format for governancelist

* Fixes

- drop unused include
- use proper univalue "get_" functions
- shorter/translatable statuses
- shorter dates
- add missing css styles

* qt: addresses governancelist code review items

* qt: use enum to name columns of governancelist

* fix: clear context menu before adding new items

* fix: skip potential nullptr proposals

* improve: show proposal url in context menu

* refactor: tweak enum name, make sure it's int starting from 0, use full name

* fix: column count

* improve: make it sortable, sort by start_date by default

* qt: use full col name in voting status col change signal emit

* better sorting

* use mapToSource to fix data fetching

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-29 21:14:25 -04:00
Kittywhiskers Van Gogh
e534b48820 merge bitcoin#16887: Abstract out some of the descriptor Span-parsing helpers 2021-10-29 23:36:54 +05:30
Kittywhiskers Van Gogh
8647ba1316 merge bitcoin#15986: Add checksum to getdescriptorinfo 2021-10-29 23:36:54 +05:30
Kittywhiskers Van Gogh
84097e861d partial bitcoin#15749: fix importmulti only imports origin info for PKH outputs 2021-10-29 23:36:50 +05:30
MarcoFalke
847a75ba4a
Merge #15971: validation: Add compile-time checking for negative locking requirement in LimitValidationInterfaceQueue
62d50ef308 Add LOCKS_EXCLUDED(cs_main) to LimitValidationInterfaceQueue(...) which does AssertLockNotHeld(cs_main) (practicalswift)

Pull request description:

  This PR adds compile-time checking for negative locking requirements that follow from the run-time locking requirement `AssertLockNotHeld(cs_main)` in `LimitValidationInterfaceQueue(...)`.

  Changes:
  * Add `LOCKS_EXCLUDED(cs_main)` to `LimitValidationInterfaceQueue(...)` which does `AssertLockNotHeld(cs_main)`
  * Add `LOCKS_EXCLUDED(cs_main)` to `CChainState::ActivateBestChain(…)`, `CChainState:: InvalidateBlock(…)` and `CChainState::RewindBlockIndex(…)` which all call `LimitValidationInterfaceQueue(...)` which does `AssertLockNotHeld(cs_main)`
  * Add `LOCKS_EXCLUDED(cs_main)` to `InvalidateBlock(…)` which calls `CChainState::InvalidateBlock(...)` which in turn calls `LimitValidationInterfaceQueue(...)` which  does `AssertLockNotHeld(cs_main)`
  * Add `LOCKS_EXCLUDED(cs_main)` to `RewindBlockIndex(…)` which calls `CChainState::RewindBlockIndex(...)` which in turn calls `LimitValidationInterfaceQueue(...)` which does `AssertLockNotHeld(cs_main)`

ACKs for commit 62d50e:
  MarcoFalke:
    utACK 62d50ef308

Tree-SHA512: 73d092ccd08c851ae3c5d60370c369fc030c5793f5507e2faccb6f91c851ddc0ce059fbea3899f2856330d7a8c78f2ac6a2988e8268b03154f946be9e60e3be1
2021-10-29 16:29:53 +03:00
UdjinM6
42fb46d470
Fix block index inconsistency in MarkConflictingBlock()
Same idea as in 16849
2021-10-29 16:29:53 +03:00
Wladimir J. van der Laan
fba2a546f6
Merge #16849: Fix block index inconsistency in InvalidateBlock()
2a4e60b48261d3f0ec3d85f97af998ef989134e0 Fix block index inconsistency in InvalidateBlock() (Suhas Daftuar)

Pull request description:

  Previously, we could release `cs_main` while leaving the block index in a state
  that would fail `CheckBlockIndex()`, because `setBlockIndexCandidates` was not being
  fully populated before releasing `cs_main`.

ACKs for top commit:
  TheBlueMatt:
    utACK 2a4e60b48261d3f0ec3d85f97af998ef989134e0. I also discovered another issue in InvalidateBlock while reviewing, see #16856.
  Sjors:
    ACK 2a4e60b. Tested on top of #16899. Also tested `invalidateblock` with `-checkblockindex=1`.
  fjahr:
    ACK 2a4e60b. Ran tests, reviewed code, inspected behavior while manually testing `invalidateblock`.

Tree-SHA512: ced12f9dfff0d413258c709921543fb154789898165590b30d1ee0cdc72863382f189744f7669a7c924d3689a1cc623efdf4e5ae3efc60054572c1e6826de612
2021-10-29 16:29:53 +03:00
Wladimir J. van der Laan
6f0646a262
Merge #15402: Granular invalidateblock and RewindBlockIndex
519b0bc5dc5155b6f7e2362c2105552bb7618ad0 Make last disconnected block BLOCK_FAILED_VALID, even when aborted (Pieter Wuille)
8d220417cd7bc34464e28a4861a885193ec091c2 Optimization: don't add txn back to mempool after 10 invalidates (Pieter Wuille)
9ce9c37004440d6a329874dbf66b51666d497dcb Prevent callback overruns in InvalidateBlock and RewindBlockIndex (Pieter Wuille)
9bb32eb571a846b66ed3bac493f55cee11a3a1b9 Release cs_main during InvalidateBlock iterations (Pieter Wuille)
9b1ff5c742dec0a6e0d6aab29b0bb771ad6d8135 Call InvalidateBlock without cs_main held (Pieter Wuille)
241b2c74ac8c4c3000e778554da1271e3f293e5d Make RewindBlockIndex interruptible (Pieter Wuille)
880ce7d46b51835c00d77a366ec28f54a05239df Call RewindBlockIndex without cs_main held (Pieter Wuille)
436f7d735f1c37e77d42ff59d4cbb1bd76d5fcfb Release cs_main during RewindBlockIndex operation (Pieter Wuille)
1d342875c21b5d0a17cf4d176063bb14b35b657e Merge the disconnection and erasing loops in RewindBlockIndex (Pieter Wuille)
32b2696ab4b079db736074b57bbc24deaee0b3d9 Move erasure of non-active blocks to a separate loop in RewindBlockIndex (Pieter Wuille)
9d6dcc52c6cb0cdcda220fddccaabb0ffd40068d Abstract EraseBlockData out of RewindBlockIndex (Pieter Wuille)

Pull request description:

  This PR makes a number of improvements to the InvalidateBlock (`invalidateblock` RPC) and RewindBlockIndex functions, primarily around breaking up their long-term cs_main holding. In addition:
  * They're made safely interruptible (`bitcoind` can be shutdown, and no progress in either will be lost, though if incomplete, `invalidateblock` won't continue after restart and will need to be called again)
  * The validation queue is prevented from overflowing (meaning `invalidateblock` on a very old block will not drive bitcoind OOM) (see #14289).
  * `invalidateblock` won't bother to move transactions back into the mempool after 10 blocks (optimization).

  This is not an optimal solution, as we're relying on the scheduler call sites to make sure the scheduler doesn't overflow. Ideally, the scheduler would guarantee this directly, but that needs a few further changes (moving the signal emissions out of cs_main) to prevent deadlocks.

  I have manually tested the `invalidateblock` changes (including interrupting, and running with -checkblockindex and -checkmempool), but haven't tried the rewinding (which is probably becoming increasingly unnecessary, as very few pre-0.13.1 nodes remain that would care to upgrade).

Tree-SHA512: 692e42758bd3d3efc2eb701984a8cb5db25fbeee32e7575df0183a00d0c2c30fdf72ce64c7625c32ad8c8bdc56313da72a7471658faeb0d39eefe39c4b8b8474
2021-10-29 16:29:49 +03:00
PastaPastaPasta
5781bd5ee3
refactor: more llmq refactoring (#4552)
* replace raw owning ptr with unique ptr

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

* Add GUARDED_BY annotation to llmq_versionbitscache

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

* limit scope of locking cs_llmq_vbc

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

* use llmq_versionbitscache instead of versionbitscache in UpdatedBlockTip to avoid cs_main locking

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

* drop unneeded cs_main ::mempool.cs

* lock cs_main and mempool.cs in Db::Upgrade
2021-10-28 22:11:34 +03:00
PastaPastaPasta
a0b68ca856
refactor: minimize passing around llmqType just to search for LLMQParams (#4551)
* minimize passing around llmqType just to search for LLMQParams

* more

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-28 22:10:43 +03:00
UdjinM6
c20eccab44
Fix ResetBlockFailureFlags (#4545) 2021-10-28 15:42:11 +03:00
Kittywhiskers Van Gogh
3c63ffa68c merge bitcoin#15368: Descriptor checksums 2021-10-28 14:01:02 +05:30
Kittywhiskers Van Gogh
c1ae9093e2 merge bitcoin#15263: Descriptor expansions only need pubkey entries for PKH/WPKH 2021-10-28 14:01:01 +05:30
Kittywhiskers Van Gogh
b866be5f04 merge bitcoin#14491: Allow descriptor imports with importmulti 2021-10-28 13:22:04 +05:30
Kittywhiskers Van Gogh
06037f6ba7 merge bitcoin#14565: Overhaul importmulti logic 2021-10-28 11:00:15 +05:30
Kittywhiskers Van Gogh
083bc078a9 merge bitcoin#14667: Add deriveaddresses RPC util method 2021-10-28 10:56:07 +05:30
Kittywhiskers Van Gogh
3c04abb2a8 merge bitcoin#14646: Add expansion cache functions to descriptors 2021-10-28 10:56:06 +05:30
Kittywhiskers Van Gogh
49522bddb4 merge bitcoin#14477: Add ability to convert solvability info to descriptor 2021-10-28 10:56:06 +05:30
Kittywhiskers Van Gogh
95c3d05ca2 merge bitcoin#14150: Add key origin support to descriptors 2021-10-28 10:56:04 +05:30
Dzutte
60c5f9b0d5
Remove unused change_type argument of walletcreatedfundedpsbt (#4550)
This argument has been added by mistake and is not in use by Dash.

Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>
2021-10-26 23:16:04 +03:00
UdjinM6
95262de6b1
Fix potential deadlock in CInstantSendDb::Upgrade() (#4548) 2021-10-26 22:50:09 +03:00
Odysseas Gabrielides
db77905703
Merge #14527: qa: Revert "Make qt wallet test compatible with qt4" (#4547)
fadffae17f31507a3d79a7b7f1cef71660767e0d Revert "Make qt wallet test compatible with qt4" (MarcoFalke)

Pull request description:

  This removes the file added in #10098

Tree-SHA512: 4aa887ec02aec943f3d74f469c935acf57e43ddbea6f979bb37d3a14670571fa2276cf578e8978de92b5854d8b462f24e5e0addfb27b92fbedf90726eb5d985e

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-10-26 14:22:54 -04:00
Odysseas Gabrielides
c151ccaf1a
Rename variables for better clarity (#4544)
* Rename variables for better clarity

* Various changes

* Update src/llmq/blockprocessor.cpp

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-26 12:08:38 -04:00
Wladimir J. van der Laan
a63956ad32 Merge #16106: gui: Sort wallets in open wallet menu
fa90fe6440301edba71a6f0b1ba3ef1c78d5eae4 refactor: Rename getWallets to getOpenWallets in WalletController (João Barbosa)
224eb9534a8d2b0f140ecb0cc00c61af8ba1da4e gui: Sort wallets in open wallet menu (João Barbosa)

Pull request description:

  Ensure wallets are sorted by name in the open wallet menu. This also improves the change done in #15957, since it avoids a second call to `listWalletDir`.

ACKs for top commit:
  laanwj:
    code review ACK fa90fe6440301edba71a6f0b1ba3ef1c78d5eae4

Tree-SHA512: 349ea195021e56760dea3551126d1b9dc4821faab44aaf2858229db4fddaf0ce0b5eb0a8fa5025f47c77134b003067a77e8c340f9655a99e1305d430ccecced8
2021-10-25 16:11:17 -04:00
fanquake
ce9d941767 Merge #16231: gui: Fix open wallet menu initialization order
5224be5a3354e1a22ea4d7f0e40aadfccdf67064 gui: Fix open wallet menu initialization order (João Barbosa)

Pull request description:

  Fixes #16230, the menu must be created before connecting to aboutToShow signal.

ACKs for commit 5224be:
  hebasto:
    ACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064, I have tested the code on Bionic with Qt 5.12.4.
  ryanofsky:
    utACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064. Looks good, fix is simple and makes perfect sense after seeing explanation in https://github.com/bitcoin/bitcoin/pull/16118#issuecomment-503166407. Without this change (and since #16118), the menu pointer passed to `connect(m_open_wallet_action->menu(), ...)` is null and connecting has no effect. With this change, the menu is constructed earlier so the connect call can work.
  fanquake:
    ACK 5224be5a3354e1a22ea4d7f0e40aadfccdf67064 Testing included in a comment above. The segfaulting with QT_FATAL_WARNINGS is unrelated to this change.

Tree-SHA512: 97b42493b37b96683058bccf39a0ee93589293d4ba8f0c60aef7f4fb9dd084cc6d5608cd5ef531cadf5e03b1f01627ef96bc2d79f784fb38cb87aa6643183d41
2021-10-25 16:10:19 -04:00
fanquake
55739dad5a Merge #16118: gui: Enable open wallet menu on setWalletController
75485ef09 gui: Enable open wallet menu on setWalletController (João Barbosa)

Pull request description:

  `BitcoinApplication::initializeResult` and `BitcoinGUI::setWalletController` are only called after the startup rescan is completed. While the rescan is in progress the window menus are already available.

  This PR makes the Open Wallet menu disabled until `BitcoinGUI::setWalletController` is called.

  ![Screenshot 2019-05-29 at 14 17 48](https://user-images.githubusercontent.com/3534524/58560510-35377480-821d-11e9-8f96-d0573c9e47b0.png)

  Fixes #16087

ACKs for commit 75485e:
  jonasschnelli:
    utACK 75485ef0962a53946f17b761c4445627b07e6eff
  ryanofsky:
    utACK 75485ef0962a53946f17b761c4445627b07e6eff. It's a simple, sensible fix.

Tree-SHA512: 9395ceed54bbceb6cbf1cd443f783d07a6ebb8fc5515b63c6e1b8b19b216b08d1cba7eaf872814d7c426ab7192f3b416ba0d57fc84f3bcbfebf01ce153794201
2021-10-25 16:10:03 -04:00
Jonas Schnelli
ad1c40d722 Merge #15957: Show "No wallets available" in open menu instead of nothing
c3ef63a52 Show loaded wallets as disabled in open menu instead of nothing (MeshCollider)

Pull request description:

  Fixes the confusing behavior reported in #15952

  ![image](https://user-images.githubusercontent.com/3211283/57224284-0e8e7f80-705d-11e9-9554-2450cc3dbb8e.png)

ACKs for commit c3ef63:
  jonasschnelli:
    Tested ACK c3ef63a52f304a600fff1f9c7caa5cb804d41d43
  kristapsk:
    tACK c3ef63a52f304a600fff1f9c7caa5cb804d41d43

Tree-SHA512: fc2b94936ca32b89e8146c65e3629785883d78660afc8838818df652a4df9185ddca6b36ebf140a7159ab42b0fa5aa72867558d4572a009be06f0831fa813d1f
2021-10-25 16:07:12 -04:00
Wladimir J. van der Laan
d90e81919f Merge #15462: gui: Fix async open wallet call order
a720a983015c9ef8cc814c16a5b9ef6379695817 gui: Fix async open wallet call order (João Barbosa)

Pull request description:

  Fixes #15455. Must call `OpenWalletActivity::open` asynchronously only after all connections are made to the `OpenWalletActivity` instance, otherwise signals can be missed.

Tree-SHA512: 4e5fdbd09d2ca017ed07a1813c2707c09f96275f1498779804e322e0a4dbd7dcff0c2e9cd6ec18463cd427b88b192a8d02373de9edc2b03ba5e4b8484b264417
2021-10-25 16:06:30 -04:00
UdjinM6
eb95f83096
Merge pull request #4540 from PastaPastaPasta/backport-new-wallet
Backport 15153, 15195
2021-10-25 23:04:50 +03:00
Jonas Schnelli
808f77bea0 Merge #15195: gui: Add Close Wallet action
94086fb59 gui: Add close wallet action (João Barbosa)
f77ba3431 gui: Add closeWallet to WalletController (João Barbosa)
f6122abe0 interfaces: Add remove to Wallet (João Barbosa)

Pull request description:

  This PR adds support to close the current wallet in the GUI.

  <img width="543" alt="screenshot 2019-01-18 at 00 44 26" src="https://user-images.githubusercontent.com/3534524/51358241-424b9680-1aba-11e9-88f2-b85869507737.png">
  <img width="532" alt="screenshot 2019-01-18 at 00 44 38" src="https://user-images.githubusercontent.com/3534524/51358242-424b9680-1aba-11e9-83e2-fa275a9017b3.png">

Tree-SHA512: fd7da4d0f73dc240864cc57a1ff1526daf2376904ce3872e52eeca5d40cc21c6dd29eb2ef25f85ffa63697362c150221a2369d80ad36ae445cc99989d337b688
2021-10-25 16:03:02 -04:00
UdjinM6
61a69cf09b
Merge pull request #4511 from kittywhiskers/bench
merge bitcoin#13219...#15779: benchmarks
2021-10-25 22:58:54 +03:00
UdjinM6
5ea0ae28a9 Fix BLS/BLS_DKG benchs after 15788 2021-10-25 23:21:04 +05:30
MarcoFalke
90c82aca85
Merge #15699: Remove no-op CClientUIInterface::[signal_name]_disconnect. Disconnect BlockNotifyGenesisWait and RPCNotifyBlockChange properly.
6dd469a3be Disconnect BlockNotifyGenesisWait and RPCNotifyBlockChange properly. Remove no-op CClientUIInterface::[signal_name]_disconnect. (practicalswift)

Pull request description:

  Resolves #15698.

  Changes:
  * Remove no-op `CClientUIInterface::[signal_name]_disconnect`.
  * Disconnect `BlockNotifyGenesisWait` and `RPCNotifyBlockChange` properly.

ACKs for commit 6dd469:
  MarcoFalke:
    utACK 6dd469a3bea60d8857ec0be625c2ef8a7716c148

Tree-SHA512: 0b50d658fa72261332bc57ddea379fd08f4bc1de392c10c628e20142d6fd244b606c39fd0665d6bc39324c1aa8c8814ac942b4659106279e33b90206aaf37411
2021-10-25 12:22:06 -04:00
MarcoFalke
02c6ecb02f
Merge #15655: Resolve the checkpoints <-> validation circular dependency
418d3230f8 Resolve the checkpoints <-> validation CD. (251)

Pull request description:

  This pull request attempts to resolve the `checkpoints -> validation -> checkpoints` circular dependency.

  The circular dependency is resolved by moving the `CheckPoints::GetLastCheckpoint(const CCheckpointData& data)` function to `validation.cpp` where it used exclusively by the private function `ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, const CChainParams& params, const CBlockIndex* pindexPrev, int64_t nAdjustedTime)`.

ACKs for commit 418d32:
  promag:
    utACK 418d323, only `GetLastCheckpoint` usage is in `validation.cpp` and so makes sense to move it there.
  practicalswift:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa
  MarcoFalke:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa
  sipa:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa

Tree-SHA512: 03c3556bc192e65f5e3fa76fd545d4ee7d63d3fb06b132f7a1fa6131aa21ddd2e5b2d19e2222dfe524f422daaca30efde219bed188db8c74ff4b088876b5bc16
2021-10-25 12:22:06 -04:00
Wladimir J. van der Laan
7fa4ef1199
Merge #15829: qt: update request payment button text and tab description
81b2830b1517ca36776d6afb6cc6e20b729d12c7 qt: update request payment button text and tab description (Tobias Kaderle)

Pull request description:

  Rebased and squashed version of #14484.

  ![create new address](https://user-images.githubusercontent.com/863730/56212202-1f665980-608c-11e9-80d8-87a6211a9def.png)

  ![addresses dialog](https://user-images.githubusercontent.com/863730/56212205-22614a00-608c-11e9-83e4-efe531ea6070.png)

ACKs for commit 81b283:
  MarcoFalke:
    utACK 81b2830b1517ca36776d6afb6cc6e20b729d12c7
  jonasschnelli:
    utACK 81b2830b1517ca36776d6afb6cc6e20b729d12c7
  meshcollider:
    utACK 81b2830b15

Tree-SHA512: 96c6dc1f08560066110ec916b0a8879265db46174a5c5993332509b6bceb93ed6a8e06e3e8bd382e35aacc1c4d4a2458ec1d065213060db34ded4f0b2683964a
2021-10-25 12:20:19 -04:00
MarcoFalke
e0e2a2e3fe
Merge #15352: tests: Reduce noise level in test_bitcoin output
0aef39d067 Silence "Test case [...] did not check any assertions" warnings when running "test_bitcoin --log_level=test_suite" (practicalswift)
5fd73c8694 Avoid repeated log messages in tests by connecting to signal handlers (ThreadSafeMessageBox, etc.) only once (practicalswift)
e502c3c515 tests: Reduce noise level in test_bitcoin output (practicalswift)

Pull request description:

  Reduce noise level in `test_bitcoin` output.

  Context: When working on the non-determinism issues in the unit tests (see #15296) I got a bit tired of the amount of noise in the `test_bitcoin` output :-)

  Before:

  ```
  $ src/test/test_bitcoin --log_level=test_suite 2>&1 | grep -vE '(Entering|Leaving)' | uniq -c
        1 Running 341 test cases...
        1 Test case blockencodings_tests/TransactionsRequestDeserializationOverflowTest did not check any assertions
        1 CheckSplitTorReplyLine(PROTOCOLINFO PIVERSION)
        1 CheckSplitTorReplyLine(AUTH METHODS=COOKIE,SAFECOOKIE COOKIEFILE="/home/x/.tor/control_auth_cookie")
        1 CheckSplitTorReplyLine(AUTH METHODS=NULL)
        1 CheckSplitTorReplyLine(AUTH METHODS=HASHEDPASSWORD)
        1 CheckSplitTorReplyLine(VERSION Tor="0.2.9.8 (git-a0df013ea241b026)")
        1 CheckSplitTorReplyLine(AUTHCHALLENGE SERVERHASH=aaaa SERVERNONCE=bbbb)
        1 CheckSplitTorReplyLine(COMMAND)
        1 CheckSplitTorReplyLine(COMMAND SOME  ARGS)
        1 CheckSplitTorReplyLine(COMMAND  ARGS)
        1 CheckSplitTorReplyLine(COMMAND   EVEN+more  ARGS)
        1 CheckParseTorReplyMapping(METHODS=COOKIE,SAFECOOKIE COOKIEFILE="/home/x/.tor/control_auth_cookie")
        1 CheckParseTorReplyMapping(METHODS=NULL)
        1 CheckParseTorReplyMapping(METHODS=HASHEDPASSWORD)
        1 CheckParseTorReplyMapping(Tor="0.2.9.8 (git-a0df013ea241b026)")
        1 CheckParseTorReplyMapping(SERVERHASH=aaaa SERVERNONCE=bbbb)
        1 CheckParseTorReplyMapping(ServiceID=exampleonion1234)
        1 CheckParseTorReplyMapping(PrivateKey=RSA1024:BLOB)
        1 CheckParseTorReplyMapping(ClientAuth=bob:BLOB)
        1 CheckParseTorReplyMapping(Foo=Bar=Baz Spam=Eggs)
        1 CheckParseTorReplyMapping(Foo="Bar=Baz")
        1 CheckParseTorReplyMapping(Foo="Bar Baz")
        1 CheckParseTorReplyMapping(Foo="Bar\ Baz")
        1 CheckParseTorReplyMapping(Foo="Bar\Baz")
        1 CheckParseTorReplyMapping(Foo="Bar\@Baz")
        1 CheckParseTorReplyMapping(Foo="Bar\"Baz" Spam="\"Eggs\"")
        1 CheckParseTorReplyMapping(Foo="Bar\\Baz")
        1 CheckParseTorReplyMapping(Foo="Bar\nBaz\t" Spam="\rEggs" Octals="\1a\11\17\18\81\377\378\400\2222" Final=Check)
        1 CheckParseTorReplyMapping(Valid=Mapping Escaped="Escape\\")
        1 CheckParseTorReplyMapping(Valid=Mapping Bare="Escape\")
        1 CheckParseTorReplyMapping(OneOctal="OneEnd\1" TwoOctal="TwoEnd\11")
        1 CheckParseTorReplyMapping(Null="\0")
        1 CheckParseTorReplyMapping(SOME=args,here MORE optional=arguments  here)
        1 CheckParseTorReplyMapping(ARGS)
        1 CheckParseTorReplyMapping(MORE ARGS)
        1 CheckParseTorReplyMapping(MORE  ARGS)
        1 CheckParseTorReplyMapping(EVEN more=ARGS)
        1 CheckParseTorReplyMapping(EVEN+more ARGS)
        1 Test case util_tests/util_criticalsection did not check any assertions
        1 Testing known outcomes
      326 Error: Specified -walletdir "/tmp/test_bitcoin/1553850209_943311758/tempdir/path_does_not_exist" does not exist
      327 Error: Specified -walletdir "/tmp/test_bitcoin/1553850209_643733972/tempdir/not_a_directory.dat" is not a directory
      328 Error: Specified -walletdir "wallets" is a relative path
        1
        1 *** No errors detected

  ```

  After:

  ```
  $ src/test/test_bitcoin --log_level=test_suite 2>&1 | grep -vE '(Entering|Leaving)' | uniq -c
        1 Running 341 test cases...
        1 Error: Specified -walletdir "/tmp/test_bitcoin/1553850026_943311758/tempdir/path_does_not_exist" does not exist
        1 Error: Specified -walletdir "/tmp/test_bitcoin/1553850026_643733972/tempdir/not_a_directory.dat" is not a directory
        1 Error: Specified -walletdir "wallets" is a relative path
        1
        1 *** No errors detected

  ```

ACKs for commit 0aef39:
  MarcoFalke:
    utACK 0aef39d0678ec2f26633028d44eea0ba0087e7c0

Tree-SHA512: 9cc22f64aa5c875861bae6533d18675ad978c623f053754deef6a8e271ea70bda3f72fb4ec5c8fd19b841757f21380639051d5f5b44301b9d2464b57655e9c05
2021-10-25 12:20:19 -04:00
Kittywhiskers Van Gogh
046fcc2060 partial bitcoin#15779: wallet_balance benchmark 2021-10-25 21:28:37 +05:30
Kittywhiskers Van Gogh
ad203019f9 merge bitcoin#15788: Unify testing setups for fuzz, bench, and unit tests 2021-10-25 21:28:37 +05:30
PastaPastaPasta
c2fa9af2d1
Merge #14957: wallet: Initialize stop_block in CWallet::ScanForWalletTransactions (#4538)
* Merge #14957: wallet: Initialize stop_block in CWallet::ScanForWalletTransactions

8b9171ccf wallet: Initialize stop_block to nullptr in CWallet::ScanForWalletTransactions (Ben Woosley)

Pull request description:

  Previously the argument would be untouched if the first block scan failed. This
  makes the behavior predictable, and consistent with the documentation.

Tree-SHA512: 3efadf9fd5e25ecd9450f32545f58e61a123ad883e921ef427b13e4782ffdd8ffe905c9ad3edc7e8f9e4953342cd72247bb4cc9eeaf9e5fd04291ac5c1bb5eec

# Conflicts:
#	src/wallet/test/wallet_tests.cpp

* Add lock annotation

* fix

Co-authored-by: MeshCollider <dobsonsa68@gmail.com>
2021-10-25 17:32:11 +03:00
PastaPastaPasta
7b78390015
refactor: Include adjustments (#4526)
* include adjustments

* fix macOs build failure

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

* expcitly include array in spork.h

* sort includes in most files
2021-10-25 16:55:34 +03:00
UdjinM6
81cc1a0a9d
Merge pull request #4525 from dzutte-cpp/merge_14796_14885_14875
Merge bitcoin#14796, #14885 and #14875
2021-10-25 16:52:02 +03:00
Kittywhiskers Van Gogh
f1a2cdb680
merge bitcoin#15855: Add missing LockAnnotation for cs_main (#4530)
* merge bitcoin#15855: Add missing LockAnnotation for cs_main

* mutex: update cs_main locks, assertions and annotations

This commit is a squash between 8c98823 and 90d0535
2021-10-25 16:14:34 +03:00
Kittywhiskers Van Gogh
544823b272 merge bitcoin#15473: bench: Benchmark MempoolToJSON 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
f1cd71785d merge bitcoin#15413: Add missing cs_main locks required when accessing pcoinsdbview, pcoinsTip or pblocktree 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
a72eb30bf3 merge bitcoin#14400: Add Benchmark to test input de-duplication worst case 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
f71a9e586e merge bitcoin#13806: Fix bench/block_assemble assert failure 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
a86b67d040 merge bitcoin#13534: Don't assert(foo()) where foo() has side effects 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
8b8a3b8681 merge bitcoin#13530: Add missing pow.h header 2021-10-25 14:49:12 +05:30
Kittywhiskers Van Gogh
ea3dc3b679 merge bitcoin#13219: Add block assemble benchmark 2021-10-25 14:49:12 +05:30
PastaPastaPasta
e66f5e4e70
Merge #18181: test: Remove incorrect assumptions in validation_flush_tests (#4536)
faca8eff39876cc8c0ee609a89bdcebc21976d47 test: Remove incorrect assumptions in validation_flush_tests (MarcoFalke)
fa31eebfe9107e14dc1d6b588f5b4c878d1010de test: Tabs to spaces in all tests (MarcoFalke)

Pull request description:

  The tests assume standard library internals that may not hold on all supported archs or when the code is instrumented for sanitizer or debug use cases

  Fixes #18111

ACKs for top commit:
  jamesob:
    ACK faca8eff39 pending passing tests
  fjahr:
    ACK faca8eff39876cc8c0ee609a89bdcebc21976d47

Tree-SHA512: 60a5ae824bdffb0762f82f67957b31b185385900be5e676fcb12c23d53f5eea734601680c2e3f0bdb8052ce90e7ca1911b1342affb67e43d91a506b111406f41

# Conflicts:
#	src/test/validation_flush_tests.cpp

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-10-24 13:52:19 +03:00
PastaPastaPasta
a8769a3cda
Merge bitcoin#16205: Refactor: Replace fprintf with tfm::format (#4531)
* tinyformat: Add doc to Bitcoin Core specific strprintf

* scripted-diff: Replace fprintf with tfm::format

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/fprintf\(std(err|out), /tfm::format(std::c\1, /g' $(git grep -l 'fprintf(' -- ':(exclude)src/crypto' ':(exclude)src/leveldb' ':(exclude)src/univalue' ':(exclude)src/secp256k1')
-END VERIFY SCRIPT-

* Replace remaining fprintf with tfm::format manually

* fixes

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-10-24 13:51:47 +03:00
Jonas Schnelli
1aa84f8a3b
Merge #15153: gui: Add Open Wallet menu
1951ea434 gui: Show indeterminate progress dialog while opening walllet (João Barbosa)
8847cdaaa gui: Add OpenWalletActivity (João Barbosa)
4c8982a88 interfaces: Avoid interface instance if wallet is null (João Barbosa)
be82dea23 gui: Add thread to run background activity in WalletController (João Barbosa)
6c49a55b4 gui: Add Open Wallet menu (João Barbosa)
32a8c6abf gui: Add openWallet and getWalletsAvailableToOpen to WalletController (João Barbosa)
ab288b4e5 interfaces: Add loadWallet to Node (João Barbosa)
17abc0fd5 wallet: Factor out LoadWallet (João Barbosa)

Pull request description:

  The *Open Wallet* menu has all the available wallets currently not loaded. The list of the available wallets comes from `listWalletDir`.

  In the future the menu can be replaced by a custom dialog.

  <img width="674" alt="screenshot 2019-01-12 at 12 17 02" src="https://user-images.githubusercontent.com/3534524/51073166-ac041480-1664-11e9-8302-be81702bc146.png">

Tree-SHA512: ebfd75eee0c8264863748899843afab67dadb7dff21313c11e3cb5b6108d954978dd1f1ae786bc07580c5a771ea4ab38d18c1643c9b9b3683ed53f0f6c582e38
2021-10-23 18:51:22 -04:00
PastaPastaPasta
29dbe98ee2
Merge pull request #4498 from kittywhiskers/assumeutxo
merge bitcoin#15948, #15976, #16194...: assumeutxo project backports (part 1)
2021-10-23 14:52:00 -04:00
PastaPastaPasta
cd29362eea
Merge bitcoin#23181: refactor: remove references to deprecated values under std::allocator (#4534)
* Merge bitcoin/bitcoin#23181: refactor: remove references to deprecated values under std::allocator

ea4b61a1570178ebe5851b5fb4065222e3926f7e refactor: remove references to deprecated values under std::allocator (Pasta)

Pull request description:

  Removes usages of allocator::pointer, allocator::const_pointer, allocator::reference and allocator::const_reference which are deprecated in c++17 and **removed** in c++20. See https://en.cppreference.com/w/cpp/memory/allocator

  Also prefers `using` over `typedef` see: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rt-using I'll be happy to revert this if requested so

ACKs for top commit:
  laanwj:
    Re-ACK ea4b61a1570178ebe5851b5fb4065222e3926f7e

Tree-SHA512: 9353e47a7de27bcd91b341eb2d832318b51fce9f508fcc791f05c02c5a160f430f4e7214e76f4b3e29639750d311c679789d8b7409255b13637391e4575c9ebe

* extend 23181

Co-authored-by: W. J. van der Laan <laanwj@protonmail.com>
2021-10-23 19:26:55 +03:00
MarcoFalke
8bb274f180 Merge #14875: RPCHelpMan: Support required arguments after optional ones
fa9a5bc1a0 RPCHelpMan: Support required arguments after optional ones (MarcoFalke)

Pull request description:

  There was a requirement that required arguments could not be positioned after an optional argument, but the deprecation of priority made the second argument to `prioritisetransaction` optional. So support that in `RPCHelpMan`.

  Also format all named arguments in the same way (without the wrapping `"` even for strings), since the extended description already mentions the type and it feels odd to special case strings.

Tree-SHA512: c125145afb4a63abc995aaf0a89489efc0f470a720727a1ca6ee0bfd2bcbc59e87c38128dd1e0cdf03dbb5b18e84867887c3dabf6ec8378e66cb1f4cecb9e407
2021-10-22 09:48:25 -07:00
MarcoFalke
de06e3164b Merge #14885: rpc: Assert named arguments are unique in RPCHelpMan
e09a5875ca rpc: Assert named arguments are unique in RPCHelpMan (João Barbosa)

Pull request description:

  Prevents an obvious mistake.

Tree-SHA512: 32c24a1934b17ab6f0d5cd31bdf0388e93ee5156ccc1b4f78eb9fd7f1d4b27a4b978b594ff11812bc9f20987c9fc36bf4497ddaedf18cf6bcbea19c050571334
2021-10-22 09:48:25 -07:00
Dzutte
bbb9949dc1 Dash-specific changes to pass argument descriptions to RPCHelpMan
Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>
2021-10-22 09:48:25 -07:00
MarcoFalke
becabf641d Merge #14796: rpc: Pass argument descriptions to RPCHelpMan
fabca42c68 RPCHelpMan: Add space after colons in extended description (MarcoFalke)
fafd040f73 rpc: Add description to fundrawtransaction vout_index (MarcoFalke)
1db0096f61 rpc: Pass argument descriptions to RPCHelpMan (MarcoFalke)

Pull request description:

  This will normalize the type names and formatting for the rpc arguments

Tree-SHA512: 6ab344882f0fed36046ab4636cb2fa5d2479c6aae22666ca9a0d067edbb9eff8de98010ad97c8ce40ab532d15d1ae67120a561b0bf3da837090d7de427679f4f
2021-10-22 09:48:25 -07:00
UdjinM6
4606c50643 mutex: refactor coinjoin mutex locking logic 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
2da416a664 mutex: lock mempool.cs before calling LimitMempoolSize() 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
16e238d8ab mutex: lock cs_main before calling ::ChainstateActive().CoinsTip() 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
692928d618 trivial: make linter happy 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
f9c4b85575 merge bitcoin#16945: introduce CChainState::GetCoinsCacheSizeState 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
510ee3581a merge bitcoin#16743: move LoadChainTip/RelayBlocks under CChainState 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
80d08bb487 merge bitcoin#16757: CChainState return values 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
84339a4b84 merge bitcoin#16443: have CCoins* data managed under CChainState 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
51f73b558f merge bitcoin#15999: Remove dead code in LoadChainTip 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
8dbf26e737 merge bitcoin#16355: move CCoinsViewErrorCatcher out of init.cpp 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
a620d941d3 merge bitcoin#16194: share blockmetadata with BlockManager
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
900c0100eb merge bitcoin#16092: Don't use global (external) symbols for symbols that are used in only one translation unit 2021-10-22 08:15:38 +05:30
Kittywhiskers Van Gogh
1bb1cea5c9 merge bitcoin#15976: move methods under CChainState
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-22 08:15:38 +05:30