Commit Graph

18941 Commits

Author SHA1 Message Date
UdjinM6
18c4ad1468
tests: Tweak sporks.py to work with any defaults (#3842) 2020-12-01 17:48:35 +00:00
UdjinM6
548cdac180
Bring --enable-stacktraces configure option back (#3826)
Make it possible to disable stacktraces completely again. This is needed for OSes with no backtrace support e.g. Alpine Linux.
2020-12-01 04:18:46 +00:00
dustinface
3a02c6d74c
rpc|governance|test: Store prepared governance objects and implement "gobject list-prepared" (#3811)
* governance: Add CGovernanceObject::ToJson()

* rpc: Save governance objects before tx commit in gobject_prepare

* rpc: Add "gobject list-prepared"

* test: Implement tests for "gobject list-prepared"

* test: Add "feature_governance_objects.py" to BASE_SCRIPTS in test_runner

* rpc: Rename parameter: limit => count

* rpc: Rephrase "Maximal" => "Maximum"

* rpc|test: Set default count of "gobject list-prepared" to 10

* rpc: Align behaviour/message or count parameter with existing commands

* rpc|test: Reverse order of "gobject list-prepared" output
2020-12-01 03:55:29 +00:00
PastaPastaPasta
a70ea0cafd
tests: adjust some comments in interface_zmq_dash.py (#3839)
Signed-off-by: pasta <pasta@dashboost.org>
2020-11-30 17:01:31 +00:00
UdjinM6
dc3ea69f49
Fix Node::getLogCategories() to work with Dash-specific log categories (#3837)
We use top 32 bits of uint64_t for Dash-specific log categories, see logging.h
2020-11-29 17:28:14 +00:00
UdjinM6
13c1ffb345
qt: Use system default fixed pitch font for Console (#3831)
* Use system default fixed pitch font for Console

* qt: RPCConsole::messagesWidget - Directly apply the fixed pitch font

Instead of setting the font family in the stylesheet.

* qt: Introduce vecIgnoreObjects and add messagesWidget to it

Exclude messagesWidget from font updates because it should have a fixed pitch font.

* qt: Set the default consoleFontSize based on the used font

* Clamp consoleFontSize instead of ignoring invalid values

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-11-28 19:26:40 +00:00
UdjinM6
46eddc8e03
tests: Make sure txes are actually included in blocks we mine in feature_llmq_is_retroactive.py (#3833) 2020-11-28 19:19:59 +00:00
UdjinM6
02d083616d
tests: Few trivial tweaks/cleanups (#3834)
* Convert comments into log output in feature_llmq_dkgerrors.py

* Remove llmq folder in wallet_backup.py

* There is no `-blockmaxweight` option in Dash
2020-11-28 19:18:01 +00:00
UdjinM6
071ec6c4fc
tests: Let mine_quorum handle expected connections count based on spork21 state (#3832) 2020-11-28 19:16:31 +00:00
UdjinM6
b2cc7a8c96
rpc: Add submit option to protx register(_fund) RPC commands (#3830)
Setting `submit` to `false` will force these RPCs to return raw tx hex instead of sending it to the network.
2020-11-28 19:14:29 +00:00
UdjinM6
251a9622f5
ci: Fix build matrix (#3825)
Should enable crash hooks, not stacktraces.
2020-11-28 19:08:30 +00:00
UdjinM6
757c99eb20
evo/llmq/spork: Fix various (potential) locking issues (#3829)
* Fix potential deadlock in `CSporkManager::UpdateSpork()`

* Protect `inputRequestIds` with cs lock

* Protect `curDBTransaction` in `CEvoDB::CommitRootTransaction()`

* Check for `AssertLockNotHeld` in `EnforceBestChainLock()` instead of just having a comment in code

* Protect spork maps on (de)serialization
2020-11-28 19:06:51 +00:00
UdjinM6
ff1ecb67f1
rpc: Fix "help" rpc (#3835)
Fix "subcommand" param name and description, add "subcommand" to named args list
2020-11-28 19:03:48 +00:00
UdjinM6
3b48c96784
Fix a couple of issues with -rescan (#3828)
* Update key metadata when we find a key which appears to be used earlier than we expected

* Introduce second mode for `-rescan` to be able to rescan from genesis block

* Add `-rescan=2` option to Repair tab

* Expose `nTimeFirstKey` in `CreateWalletFromFile` logs and in `getwalletinfo` rpc

* fix: check `pIndex != nullptr`

* Ignore incorrect -rescan values
2020-11-27 17:59:07 +03:00
dustinface
b43f8da53e
qt: MasternodeList - Introduce column enum and fix column sorting (#3822)
* qt: Introduce columns enum in masternode list

* qt: Add CMasternodeListWidgetItem to fix sorting in some columns

* Sort Service column properly too

* qt: Make CMasternodeListWidgetItem a template class

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-27 17:56:57 +03:00
dustinface
6bf130951f
wallet: Add methods to store governance objects (#3810)
* wallet: Add methods to store governance objects in the walletdb

* wallet: Cache all governance objects in m_gobjects + load them on start

* wallet: Assert cs_wallet is locked in LoadGovernanceObject

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

* wallet: Extend a comment

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>
2020-11-27 17:56:27 +03:00
dustinface
90f7d7ff2a
test: Implement tests for all dash related ZMQ notifications (#3804)
* test: Add more C++ representing classes in message.py

* test: Add interface_zmq_dash.py

* test: Add interface_zmq_dash.py to BASE_SCRIPTS in test_runner.py

* test: Adjust hashrecoveredsig parsing

* Force node0 to finish syncing

* Avoid `uint256_to_string(uint256_from_str())`

* Be more specific in imports

* Plural for "publisher" when makes sense

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-27 17:55:28 +03:00
PastaPastaPasta
e72164e719
rpc: implement whitelist for commands needed by Dash Platform (#3738)
* implement whitelist for commands needed by Dash Platform

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

* Add test for platform command filtering

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

* Use less if statements

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

* make defaultPlatformUser const

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

* test: Make rpc_platform_filter.py executable

* test: Refactor tests in rpc_platform_filter.py

* minor modifications to rpc_platform_filter.py

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

* test: Expand test cases in rpc_platform_filter.py

* rpc: Use std::map instead of std::vector for platformAllowedCommands

* rpc: Improve readability and be more specific about the reject reason

* rpc: Fix comment

* rpc|httprpc: Rename RPC_PROTECTED_COMMAND to RPC_PLATFORM_RESTRICTION

* minor modifications to server.cpp

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

* add help text

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-11-24 02:39:50 +01:00
UdjinM6
70788f385c
Fix a crash when a new devnet is started/joined (#3823) 2020-11-20 03:12:39 +01:00
UdjinM6
72104c96ba
rpc: Show devnet name in getblockchaininfo (#3821) 2020-11-19 19:44:33 +00:00
PastaPastaPasta
ba9f31a261
Merge pull request #3820 from UdjinM6/merge_master_0.16.1.1
Merge master 0.16.1.1 back into develop
2020-11-19 16:30:46 +00:00
UdjinM6
b28d6d5e87
Merge branch 'master' into merge_master_0.16.1.1 2020-11-19 14:57:57 +03:00
UdjinM6
ac6878ffa2
tests: Fix feature_llmq_simplepose.py and feature_llmq_signing.py (#3781)
* tests: Use lower mocktime bump value to reset masternode probes in feature_llmq_simplepose.py

Bumping `50 * 60 + 1` should be enough, see https://github.com/dashpay/dash/blob/master/src/llmq/quorums_utils.cpp#L218-L222. Bumping `60 * 60 + 1` interferes with mnsync reset, see https://github.com/dashpay/dash/blob/master/src/masternode/masternode-sync.cpp#L112-L119.

* Fix expected connection count in llmq-signing.py and llmq-simplepose.py

* Sleep a couple of seconds to let mn sync tick to happen

* Move helper functions out of run_test

* Let helper functions return expect_contribution_to_fail

* No need to check for "punished" state in test_banning

* Split mninfos in test_banning and mine_quorum into "online" and "valid" sets

Needed for wait_for_masternode_probes in mine_quorum. Also, refactor and fix test_banning while at it.
2020-11-19 14:42:35 +03:00
UdjinM6
b42f2d3c9c
Merge pull request #3774 from UdjinM6/merge_master_0.16.0.1
Merge master 0.16.0.1 back into develop
2020-11-19 14:41:44 +03:00
dustinface
ecd8d44028
validation: Drop obsolete RewindBlockIndex declaration (#3813) 2020-11-17 20:15:00 +00:00
dustinface
e2d4276c32
rpc: Fix inconsistencies in gobject_prepare and gobject_submit (#3794)
* rpc: Fix parameter parsing in gobject_prepare() and gobject_submit()

The parameter description for those parameter declare them as "numeric". However, providing numbers there throws an rpc error prior to this commit because `get_str()` has a typecheck. Using `ParseInt32V`, `ParseInt64V` and `getValStr` fixes this issue with backwards compatibility i.e. it accepts integer strings and plain integers.

* rpc: Fix some parameter names in gobject_prepare() and gobject_submit()
2020-11-17 20:04:02 +00:00
UdjinM6
fa4d993a71
Backport #17249: rpc: Add missing deque include to fix build (#3815)
a5929130223973636f3fd25fbfaf2953f2ec96a9 http: add missing header bootlegged by boost < 1.72 (Jan Beich)

Pull request description:

  Regressed by boostorg/filesystem@9a14c37d6f. See [error log](https://github.com/bitcoin/bitcoin/files/3772177/bitcoin-0.18.1.log).

  ```c++
  httpserver.cpp:74:10: error: no template named 'deque' in namespace 'std'
      std::deque<std::unique_ptr<WorkItem>> queue;
      ~~~~~^
  ```

ACKs for top commit:
  laanwj:
    ACK a5929130223973636f3fd25fbfaf2953f2ec96a9

Tree-SHA512: fb0aee6a698c7aaa6a73baad7adc4f891be573af0d3cf6f4f59bc825afe5c0bc439c668077ff1990a6135522a0533a1a867430eebad28f0ade93fd79a95e179b

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
2020-11-17 22:46:07 +03:00
UdjinM6
ddf7355c3e
qt: add shortcuts for tabs in more dialogs (#3764)
* Turn class members of QButtonGroup type into pointers, fix includes

* Move `BitcoinGUI::updateToolBarShortcuts()` into `GUIUtil::updateButtonGroupShortcuts()`

* Use `GUIUtil::updateButtonGroupShortcuts()` for tab buttons in options, rpcconsole and sign/verify dialog
2020-11-17 22:45:22 +03:00
dustinface
7884b62f28
zmq|validationinterface|llmq: Implement recovered signature notifications (#3803)
* zmq: Add notifier for recovered signatures

* validationinterface: Add and connect NotifyRecoveredSig signal

* llmq: Notify about recovered signatures

* zmq: Reverse byte order of msgHash in NotifyRecoveredSig

* doc: Add hashrecoveredsig and rawrecoveredsig in zmq.md

* init: Add recovered sig options in "ZeroMQ notification" section

* init: LLMQ's -> LLMQs

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

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-11-17 20:41:30 +01:00
dustinface
e7c91558d3
test: Add and use uint256_to_string + improve some hash/string conversions (#3800)
* test: Introduce uint256_to_string

* test: Use uint256_to_string in some places

* Avoid converting back and forth, reuse known string represntations of hashes for blocks and txes instead of converting sha256

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-17 20:40:15 +01:00
UdjinM6
f720e46d2c
Merge pull request #3806 from PastaPastaPasta/backports-0.17-pr22
Backports 0.17 pr22
2020-11-17 22:38:25 +03:00
MarcoFalke
16a4608347
Merge #13082: Tests: don't test against min relay fee information in mining_prioritisetransaction.py
bd9d67b752 Don't test against min relay fee information in mining_prioritisetransaction.py (Kristaps Kaupe)

Pull request description:

  Follow-up on #13032.

  As advised by @MarcoFalke.

Tree-SHA512: a690ff2e6499b0b4ee6a952c849e363738b9a5ae553266e1780fc7910a6b01e240d71b434fe87da53dc43f6e26cec23a900ec16aab64bb8f6765c26d7aa37c56
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
1f9bf1c7cc
Merge #13032: Output values for "min relay fee not met" error
1accfbc Output values for "min relay fee not met" error (Kristaps Kaupe)

Pull request description:

  It is already done this way for "mempool min fee not met" error.

Tree-SHA512: 829db78ecc066cf93b8e93ff1aeb4e7b98883cf45f341d5be6e6b4dff4135f3f54fa49b3a6f12eb43f676a9ba54f981143c9887f786881e584370434a9566cfd
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
90038da3d9
Merge #13022: [qa] Attach node index to test_node AssertionError and print messages
80a5e59 [qa] Attach node index to test_node AssertionError and print messages (James O'Beirne)

Pull request description:

  In the midst of fighting with https://github.com/bitcoin/bitcoin/pull/12873 it became apparent that there're a number of assertions and print statements which are emitted by test nodes but don't identify the node in question. This change makes debugging a bit easier by adding identifying information to non-logger test_node-related error messages.

Tree-SHA512: 7cc86f2c81f4b3fdba15ec9a2d21a84c4b083629e845e82288087c3affbbdc5c68e74067621856cc97fe84fbc8cb4f5ca4977a51ef381e5d74515df8eb001239

fix 13022

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:34:34 -05:00
MarcoFalke
4d10091cc8
Merge #13055: qt: Don't log to console by default
aee80b0ef9 qt: Don't log to console by default (Wladimir J. van der Laan)

Pull request description:

  Default `-printtoconsole` to false for the GUI. GUI programs should not print to the console unnecessarily. For example, when launched by the window manager, the output might end up in the X session log file,
  resulting in duplicate logging. On Windows, it is pointless as well because bitcoin-qt isn't a console application.

  This same mechanism is used to set `-server` to true by default for bitcoind: https://github.com/bitcoin/bitcoin/blob/master/src/bitcoind.cpp#L116

  (fixes #13004)

Tree-SHA512: 24ae460d9d97130a063f7bf7fa6da1e6cc46643a94ea0827aa64d0f4a80647e5e7394695b24ea0f49a147a1fa07329659d224f04511fc24b97a9869d1c29b890
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
032dca5983
Merge #12885: Reduce implementation code inside CScript
54a5a21 [MOVEONLY] Turn CScript::GetOp2 into a function and move to cpp (Pieter Wuille)
6a7456a [MOVEONLY] Move CSCript::FindAndDelete to interpreter (Pieter Wuille)
33a8ecf Delete unused non-const-iterator CSCript::GetOp overloads (Pieter Wuille)
2fb168b Make iterators in CScript::FindAndDelete const (Pieter Wuille)

Pull request description:

  This PR moves `FindAndDelete` and `GetOp2` out of CScript (the first is only used inside the interpreter and moved there, the second does not actually depend on any script specifics and works on any vector). Furthermore, all non-const-iterator versions of GetOp are replaced by const ones, removing a number of methods in the process.

  The longer term goal here is making the script interpreter independent from the CScript representation.

  Note for reviewers: both `FindAndDelete` and `GetScriptOp` are consensus critical.

Tree-SHA512: c4ccf91c0b33c37cff0d474aa8dd2dab25b5b7655e2ed69a9b15e29daf0a67b21d51c23e1defb3a72ec762bd6138de96f69c6db1fb9c1fe1e976e421261aedb7

Ensure change is move only

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

fix assign_to

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:34:32 -05:00
Wladimir J. van der Laan
ca0cdbfbe8
Merge #13030: [bugfix] [wallet] Fix zapwallettxes/multiwallet interaction.
1f83839 [wallet] [tests] Test disallowed multiwallet params (John Newbery)
3476e3c [wallet] Fix zapwallettxes/multiwallet interaction. (John Newbery)

Pull request description:

  `-zapwallettxes` should be disallowed when starting bitcoin in multiwallet mode.

  There's code in `WalletInit::ParameterInteraction()` to disallow `-zapwallettxes` when running in multiwallet mode. This code functioned as expected when passing the parameter `-zapwallettxes=1`, but not when passing the parameter `-zapwallettxes` (ie without the value specified). Fix that and add a test.

  The new test in the
  _[wallet] [tests] Test disallowed multiwallet params_ commit reproduces the bug and should fail against master.

  Fixes #12505

Tree-SHA512: 6cd921717e9c7d2773ca84c946c310c2adec8430e37cbecdb33a620f510db3058a72bd328411812ba415111bc52a3367b332c9d15a37a92ccfd7ae785d2f32ab
2020-11-17 14:32:37 -05:00
Wladimir J. van der Laan
b784f869f9
Merge #12448: Interrupt block generation on shutdown request
0851a75 rpc: Interrupt block generation on shutdown request (João Barbosa)

Pull request description:

  With this simple change, after running `bitcoin-cli -regtest generate 100000`, it is possible to interrupt `bitcoind` cleanly without waiting for the generation to complete.

Tree-SHA512: f0f7cdde242e595cfdaea31ae8bddbc25933621b63f639e813d272c2b00ce2ef52f0c14ae44954ba8c49f0fc846bcc3bfd5419e52b3347a68bb0341ce6b02d26
2020-11-17 14:32:37 -05:00
MarcoFalke
1841f2f5d9
Merge #13052: trivial: Fix relevent typo
6ad47b04b9 trivial: Fix relevent typo (practicalswift)

Pull request description:

  Fix relevent typo.

Tree-SHA512: 29247a780ab2caf0180c3558632a00068b02b4de4a56825f425c66a1e515542ab1e5268971ffa9a63e46840504101b5e6a5f8dcb6070522ac3f5ca90a28262b9
2020-11-17 14:32:37 -05:00
Wladimir J. van der Laan
82cb32f1d3
Merge #13020: Consistently log CValidationState on call failure
e4d0b44 Consistently log CValidationState on failure (Ben Woosley)

Pull request description:

  This replaces potential silent failures and partial logging with full logging. Seems providing at least minimal visibility to the failure is a good practice. E.g. `FlushStateToDisk` can return a rare but meaningful out of disk space error that would be better to note than leave out.

  Note many of these are related to `ActivateBestChain` or `FlushStateToDisk`. Only a few cases of ignored state remain, e.g. LoadExternalBlockFile and RelayWalletTransaction, where I expect logging would likely be spammy.

Tree-SHA512: fb0e521039e5a5250cd9c82e7a8676423b5e3899d495649c0e71752059d1984e5175f556386ade048f51a7d59f5c8e467df7fe91d746076f97d24c000ccf7891

13020 continued

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:32:37 -05:00
Wladimir J. van der Laan
d36a4a4db3
Merge #13039: Add logging and error handling for file syncing
cf02779 Add logging and error handling for file syncing (Wladimir J. van der Laan)

Pull request description:

  Add logging and error handling inside, and outside of FileCommit.
  Functions such as fsync, fdatasync will return error in case of hardware I/O errors, and ignoring this means it can silently continue through data corruption.
  (c.f. https://lwn.net/SubscriberLink/752063/12b232ab5039efbe/)

  EINVAL is handled specially to avoid crashing out on (network, fuse) filesystems that don't handle `f[data]sync`.

  I checked that the syncing inside leveldb is already generating an I/O error as appropriate.

Tree-SHA512: 64cc9bbedca3ecc97ff4bac0a7b7ac6526a7ed763c66f6786d03ca4f2e9e366e42b152cb908299c060448d98ca39ff03395280bffaca51d592e728aa2516f5dd
2020-11-17 14:32:37 -05:00
pasta
b5dc3a0be9
scripted-diff: Rename CChainState::g_failed_blocks to m_failed_blocks (Merge: #13016)
To reflect its actual status as a member rather than a global value.

g_failed_blocks was previously global: 2862aca

-BEGIN VERIFY SCRIPT-
sed -i 's/g_failed_blocks/m_failed_blocks/g' src/validation.cpp
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:32:37 -05:00
MarcoFalke
9910a1269b
Merge #13026: Fix include comment in src/interfaces/wallet.h
defffb3587 trivial: Improve include comment in src/interfaces/wallet.h (João Barbosa)

Pull request description:

Tree-SHA512: dfb873db4be0bdaff99ee57628a64284de5ad484b4020e386ab2f5e0b478ff11d49b094d02e3e58cd2bec1d44b3b550b9c5f3da177518087cc62b4a3c9ca824e
2020-11-17 14:32:37 -05:00
MarcoFalke
40dc6c4f7b
Merge #13025: Dead code removal
1bf3f33b46 node: Removed unused wallet-related methods from the Node interface. (Thomas Snider)
b38200459f benchmark: Removed bench/perf.cpp (Thomas Snider)

Pull request description:

  Not sure if these should be separate PRs.

  First is removal of a platform abstraction for getting cycle counters where possible.  Since the benchmarking switch to counting number of iterations over a fixed window instead of counting cycles per iteration, these are unused.

  Second is removal of a few methods from the Node interface that seem vestigial from when the concepts of wallet/node were not as clearly separated.

Tree-SHA512: de1460a7d4473ca19db4e2ca845185c63c765d12462c2685044a1f27dedab266cd908bc52235a881a7ad98bc251a4abf4eae523e5f599c169e3511e489f19a0d
2020-11-17 14:32:37 -05:00
Wladimir J. van der Laan
06aebf5eb0
Merge #12988: Hold cs_main while calling UpdatedBlockTip() signal
d86edd3 Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (Jesse Cohen)

Pull request description:

  Resolves #12978

Tree-SHA512: 2aed09434cd8dbf541ea75462070b73ee87ff31409bede210f6999ffee4a37e32202a289efd37609485d4cbdfe134fe4660a10bfb41e8a8acdba7cd0b61b8780

fix indentation

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:32:38 -05:00
Wladimir J. van der Laan
f70e8bebcd
Merge #12977: Refactor g_wallet_init_interface to const reference
6ec78f1 wallet: Refactor g_wallet_init_interface to const reference (João Barbosa)
1936125 wallet: Make WalletInitInterface members const (João Barbosa)

Pull request description:

Tree-SHA512: c382156a38d4c6beaa6c48f911d7b314542b9500d88724b2b3029dae4491cb1e60e10628f6632d1366818ccf343f494650b3171593b5450149544ba198f49bb5

additional

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:32:38 -05:00
Jonas Schnelli
c0caa8ab32
Merge #11200: Allow for aborting rescans in the GUI
ae1d2b030 Give an error when rescan is aborted by the user (Andrew Chow)
69b01e6f8 Add cancel button to rescan progress dialog (Andrew Chow)

Pull request description:

  A cancel button is added to the `showProgress` dialog that is used only for rescans. When clicked, `AbortRescan` is called directly to cancel the rescan.

  Rescans triggered from the debug console will now be cancelable by clicking the cancel button.

  Rescans triggered by a command (e.g. `importmulti`) will now give an error indicating that the rescan was aborted by the user (either by the `abortrescan` command or by clicking cancel).

Tree-SHA512: 4bb14998766de686e2318fbc9805758eccf5dbe628a7257d072c9ae2fb4f61303a0876f49988d6e5eddb261969b8a307c81c0c2df0a42ae909a43d738af3dc1b
2020-11-17 14:32:37 -05:00
Wladimir J. van der Laan
0c6ba028c1
Merge #12569: net: Increase signal-to-noise ratio in debug.log by adjusting log level when logging failed non-manual connect():s
cba2800 Increase signal-to-noise ratio in debug.log by adjusting log level when logging failed non-manual connect():s (practicalswift)

Pull request description:

  Increase signal-to-noise ratio in `debug.log` by adjusting log level when logging failed non-manual `connect()`:s.

  Before this patch:

  ```
  $ src/bitcoind -printtoconsole
  …
  2018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
  2018-02-28 18:37:52 connect() 10.11.21.34:18333 failed after select(): Connection refused (111)
  2018-02-28 18:43:22 connect() to 10.11.43.14:18333 failed after select(): Network is unreachable (101)
  2018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
  2018-02-28 18:46:54 connect() to [2001:0:9d38:78ff:1234🔢1234:1234]:18333 failed: Network is unreachable (101)
  2018-02-28 18:48:56 connect() to [2001:0:9d38:6aff:1234🔢1234:1234]:18333 failed: Network is unreachable (101)
  2018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
  ```

  After this patch:

  ```
  $ src/bitcoind -printtoconsole
  …
  2018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
  2018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
  2018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
  ```

  Please note that "manual `connect()`:s" (invoked via `-connect`, `-proxy` or `addnode`) are still reported at the default log level as these messages are likely to be relevant to end-users:

  ```
  $ src/bitcoind -printtoconsole -connect=127.0.0.1:1234
  …
  2018-02-28 18:31:13 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)

  $ src/bitcoind -printtoconsole -proxy=127.0.0.1:1234
  …
  2018-02-28 18:32:32 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)

  $ src/bitcoind -printtoconsole &
  $ src/bitcoin-cli addnode 127.0.0.1:1234 onetry
  …
  2018-02-28 18:33:40 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
  ```

Tree-SHA512: 92e3c1e4b54ce8ccdd7ec31de147c8505710cd799ceb2bbc8576a086709967802403c9184df364b3cfa59bd98859f6ac8feb27fb09b9324194c6c47a042fc6d3

fix compilation

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:32:36 -05:00
PastaPastaPasta
a4d254389c
Implement new hardfork for v17 to be used in future changes (#3808)
* Implement new hardfork for v17 to be used in future changes

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

* fix comment

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-17 19:28:14 +00:00
PastaPastaPasta
595ff34676
fix ToString bug in cbtx.cpp (#3807)
* fix ToString bug

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

* Adjust ordering of tostring

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 18:22:32 +00:00