| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Some boost versions have a conflicting overload of wait_until that returns void.
Explicitly use a template here to avoid hitting that overload.
Github-Pull: #6285
Rebased-From: 72bf90d770ce5b2653fd482928646cd6a9f5f6d7
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The partition checking code was using chainActive timestamps
to detect partitioning; with headers-first syncing, it should use
(and with this pull request, does use) pIndexBestHeader timestamps.
Fixes issue #6251
Github-Pull: #6256
Rebased-From: 65b94545036ae6e38e79e9c7166a3ba1ddb83f66
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.
This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.
I intend to add this to the GUI options in another pull after this.
Github-Pull: #6274
Rebased-From: 02a6702a82a5b00e0e0351041dd3267308b7f319
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Chance "getbalance *" not to use IsTrusted. The method and result
now match the "getbalance <specific-account>" behavior. In
particular, "getbalance * 0" now works.
Also fixed a comment -- GetGalance has required 1 confirmation
for many years, and the default "getbalance *" behavior matches
that.
Github-Pull: #6276
Rebased-From: 7d6a85ab5b1dc96e0f3f6f835f27bb81ba2af919
|
| |
|
|
|
| |
Github-Pull: #6264
Rebased-From: 9b5659d1c4c62bc6b80e35ff7573c781835e4187
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some corner cases, it may be possible for recent blocks to end up in
the same block file as much older blocks. Previously, the pruning code
would stop looking for files to remove upon first encountering a file
containing a block that cannot be pruned, now it will keep looking for
candidate files until the target is met and all other criteria are
satisfied.
This can result in a noncontiguous set of block files (by number) on
disk, which is fine except for during some reindex corner cases, so
make reindex preparation smarter such that we keep the data we can
actually use and throw away the rest. This allows pruning to work
correctly while downloading any blocks needed during the reindex.
Rebased-From: c257a8c9a6397eee40734b235a4fdcb8045aec91
Github-Pull: #6221
|
| |
|
|
|
|
|
| |
We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans. Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.
Github-Pull: #5985
Rebased-From: 14d4eef79931318cb5968f9154cf458d9f8d27fa
|
| | |
|
| |
|
|
|
|
|
|
| |
AcceptBlock will no longer process an unrequested block, unless it has not
been previously processed and has more work than chainActive.Tip()
Github-Pull: #5875
Rebased-From: 9be0e6837b878f72bd087ce32b7a2f2ffb2fd544
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change `read_string` to fail when not the entire input has been
consumed. This avoids unexpected, even dangerous behavior (fixes #6223).
The new JSON parser adapted in #6121 also solves this problem so in
master this is a temporary fix, but should be backported to older releases.
Also adds tests for the new behavior.
Github-Pull: #6226
Rebased-From: 4e157fc60dae5ca69933ea4c1585a2a078b4d957
|
| |
|
|
|
| |
Github-Pull: #6203
Rebased-From: d449772cf69c01932fc5d72c46054815d6300b3c
|
| |
|
|
|
| |
Rebased-From: a1ba0778dd3c784046dea334e5d39f37eca264f7
Github-Pull: #6172
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously due to an off-by-one error the wallet ignored
nLockTime-by-height transactions that would be valid in the next block
even though they are accepted into the mempool. The transactions
wouldn't show up until confirmed, nor would they be included in the
unconfirmed balance. Similar to the mempool behavior fix in 665bdd3b,
the wallet code was calling IsFinalTx() directly without taking into
account the fact that doing so tells you if the transaction could have
been mined in the *current* block, rather than the next block.
To fix this we strip IsFinalTx() of non-consensus-critical
functionality, removing the default arguments, and add CheckFinalTx() to
check if a transaction will be final in the next block.
Github-Pull: #6183
Rebased-From: 28bf06236d3b385e95fe26a7a742395b30efd6ee
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
d6922aa [net, trivial] remove using namespace std pollution in netbase.cpp (Philip Kaufmann)
49b2292 [net, trivial] explicitly use std::string for FindNode (Philip Kaufmann)
|
| | | |
|
| | |
| |
| |
| |
| | |
- in OpenNetworkConnection we have a FindNode call, which gets a const
char*, wheras we only have defined a FindNode for std::string
|
| |\ \
| | |
| | |
| | |
| | | |
6e71efa [REST] remove json input for getutxos, limit to query max. 15 outpoints (Jonas Schnelli)
64b8027 rest.cpp: strip whitespace (Jonas Schnelli)
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Remove possibility to send json encoded parameters to `/rest/getutxos/` to avoid possible DoS scenarios.
The JSON output option is untouched.
|
| | | | |
|
| |\ \ \
| |_|/
|/| |
| | | |
8273793 Eliminate compiler warning due to unused variable (Suhas Daftuar)
|
| | | | |
|
| |/ /
| |
| |
| |
| | |
-UndoWriteToDisk
-WriteBlockToDisk
|
| |\ \
| | |
| | |
| | |
| | | |
da29ecb Consensus: MOVEONLY: Move CValidationState from main consensus/validation (jtimon)
27afcd8 Consensus: Refactor: Decouple CValidationState from main::AbortNode() (Cory Fields)
|
| | | | |
|
| | | | |
|
| |\ \ \
| |_|/
|/| |
| | | |
8c35b6f Parameter interaction: disable upnp if -proxy set (Wladimir J. van der Laan)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To protect privacy, do not use UPNP when a proxy is set. The user may
still specify -listen=1 to listen locally (for a hidden service), so
don't rely on this happening through -listen.
Fixes #2927.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
b45c50c Fix two problems in CSubNet parsing (Wladimir J. van der Laan)
19e8d7b Simplify code for CSubnet (Wladimir J. van der Laan)
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix two CSubNet constructor problems:
- The use of `/x` where 8 does not divide x was broken, due to a
bit-order issue
- The use of e.g. `1.2.3.4/24` where the netmasked bits in the network
are not 0 was broken. Fix this by explicitly normalizing the netwok
according to the bitmask.
Also add tests for these cases.
Fixes #6179. Thanks to @jonasschnelli for reporting and initial fix.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Simplify the code by using CAddress.ip directly, instead of the reversed
GetByte() semantics.
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | | |
8ba7f84 Reduce download timeouts as blocks arrive (Suhas Daftuar)
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Compare the block download timeout to what the timeout would be if calculated
based on current time and current value of nQueuedValidatedHeaders, but
ignoring other in-flight blocks from the same peer. If the calculation based on
present conditions is shorter, then set that to be the time after which we
disconnect the peer for not delivering this block.
|
| | | | | | |
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | | |
36cba8f Alert if it is very likely we are getting a bad chain (Gavin Andresen)
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Create a monitoring task that counts how many blocks have been found in the last four hours.
If very few or too many have been found, an alert is triggered.
"Very few" and "too many" are set based on a false positive rate of once every fifty years of constant running with constant hashing power, which works out to getting 5 or fewer or 48 or more blocks in four hours (instead of the average of 24).
Only one alert per day is triggered, so if you get disconnected from the network (or are being Sybil'ed) -alertnotify will be triggered after 3.5 hours but you won't get another -alertnotify for 24 hours.
Tested with a new unit test and by running on the main network with -debug=partitioncheck
Run test/test_bitcoin --log_level=message to see the alert messages:
WARNING: check your network connection, 3 blocks received in the last 4 hours (24 expected)
WARNING: abnormally high number of blocks generated, 60 blocks received in the last 4 hours (24 expected)
The -debug=partitioncheck debug.log messages look like:
ThreadPartitionCheck : Found 22 blocks in the last 4 hours
ThreadPartitionCheck : likelihood: 0.0777702
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
ffdda4e Catch errors on datadir lock and pidfile delete (Adam Weiss)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prevents bad permissions (or other fs related problems) from resulting
in hard crashes with cryptic messages on startup and shutdown.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
cc24610 Update Windows resource files (and add one for bitcoin-tx) (Luke Dashjr)
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Don't clear `stopRequested` and `stopWhenEmpty` at the top of
`serviceQueue`, as this results in a race condition: on systems under
heavy load, some of the threads only get scheduled on the CPU when the
other threads have already finished their work. This causes the flags to
be cleared post-hoc and thus those threads to wait forever.
The potential drawback of this change is that the scheduler cannot be
restarted after being stopped (an explicit reset would be needed), but
we don't use this functionality anyway.
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
16d9cb7 [QT] overviewpage: make sure warning icons gets colored (Jonas Schnelli)
|
| | | | | | | | | |
|
| |/ / / / / / / |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
935bd0a Chainparams: Refactor: Decouple main::GetBlockValue() from Params() [renamed GetBlockSubsidy] (Jorge Timón)
|
| | | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
GetBlockSubsidy]
Remove redundant getter CChainParams::SubsidyHalvingInterval()
|
| | |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Enclose MakeSingleColorImage in an anonymous namespace to avoid a
unused function warning on Windows and MacOSX.
Github-Pull: #6143
|