Age | Commit message (Collapse) | Author |
|
28bf062 Fix off-by-one error w/ nLockTime in the wallet (Peter Todd)
|
|
-UndoWriteToDisk
-WriteBlockToDisk
|
|
da29ecb Consensus: MOVEONLY: Move CValidationState from main consensus/validation (jtimon)
27afcd8 Consensus: Refactor: Decouple CValidationState from main::AbortNode() (Cory Fields)
|
|
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.
|
|
36cba8f Alert if it is very likely we are getting a bad chain (Gavin Andresen)
|
|
GetBlockSubsidy]
Remove redundant getter CChainParams::SubsidyHalvingInterval()
|
|
|
|
|
|
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
|
|
|
|
|
|
a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields)
11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields)
6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields)
9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
|
|
|
|
This pertains to app-state, so it doesn't make sense to handle inside the
checkpoint functions.
|
|
691161d Consensus: Create consensus/consensus.h with some constants (jtimon)
|
|
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:
- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
reasonably be met, with some assumptions about block sizes, orphan rates,
etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
mainnet; defined separately for mainnet, testnet, and regtest in chainparams
as nPruneAfterHeight).
This unsets NODE_NETWORK if pruning is enabled.
Also included is an RPC test for pruning (pruning.py).
Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
|
|
|
|
3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
|
|
0f5954c Regression test for ResendWalletTransactions (Gavin Andresen)
|
|
This adds a -checkblockindex (defaulting to true for regtest), which occasionally
does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and
mapBlocksUnlinked.
|
|
fc72020 don't trickle for whitelisted nodes (Ruben de Vries)
|
|
|
|
Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions."
I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived).
I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by:
1. Running bitcoind -connect=0.0.0.0:8333
2. Creating a couple of send-to-self transactions
3. Connect to a peer using -addnode
4. Waited a while, monitoring debug.log, until I see:
```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions```
One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
|
|
|
|
|
|
identifiers.
Note that this will also require translation changes in Transifex for the key
"A fee higher than %1 is considered an insanely high fee." which is now
"A fee higher than %1 is considered an absurdly high fee."
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
|
|
2ce63d3 MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h) (Luke Dashjr)
|
|
|
|
23f3435 Rename MAX_TX_SIGOPS to MAX_STANDARD_TX_SIGOPS to match similar policy constant MAX_STANDARD_TX_SIZE (Luke Dashjr)
|
|
|
|
constant MAX_STANDARD_TX_SIZE
|
|
|
|
|
|
|
|
|
|
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
|
|
afd4b94 Move CMerkleBlock and CPartialMerkleTree to their own file (Matt Corallo)
|
|
|
|
307f7d4 Report script evaluation failures in log and reject messages (Pieter Wuille)
|
|
d227011 MOVEONLY: core/ -> primitives/ (Luke Dashjr)
|
|
|
|
|
|
Fix typos where appropriate
Update license/copyright
|
|
f86a24b Move `setmocktime` to hidden category (Wladimir J. van der Laan)
bd9aebf Introduce a hidden category (Pieter Wuille)
0dd06b2 Delay writing block indexes in invalidate/reconsider (Pieter Wuille)
9b0a8d3 Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
|
|
|
|
These can be used for testing reorganizations or for manual intervention in case of
chain forks.
|
|
There are 3 pieces of data that are maintained on disk. The actual block
and undo data, the block index (which can refer to positions on disk),
and the chainstate (which refers to the best block hash).
Earlier, there was no guarantee that blocks were written to disk before
block index entries referring to them were written. This commit introduces
dirty flags for block index data, and delays writing entries until the actual
block data is flushed.
With this stricter ordering in writes, it is now safe to not always flush
after every block, so there is no need for the IsInitialBlockDownload()
check there - instead we just write whenever enough time has passed or
the cache size grows too large. Also updating the wallet's best known block
is delayed until this is done, otherwise the wallet may end up referring to an
unknown block.
In addition, only do a write inside the block processing loop if necessary
(because of cache size exceeded). Otherwise, move the writing to a point
after processing is done, after relaying.
|
|
|
|
|
|
771d500 minor cleanup: include orders, end comments etc. (Philip Kaufmann)
|