aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2013-01-14Merge pull request #2161 from sipa/noclientGavin Andresen
Remove fClient
2013-01-11Merge pull request #2145 from sipa/checkcoinsGregory Maxwell
Coin database checks
2013-01-10Merge pull request #2115 from forrestv/getblocktemplate_allfeesPieter Wuille
Provide fee data for all txs in RPC getblocktemplate response
2013-01-09Remove fClientPieter Wuille
Client (SPV) mode never got implemented entirely, and whatever part was already working, is likely not been tested (or even executed at all) for the past two years. This removes it entirely. If we want an SPV implementation, I think we should first get the block chain data structures to be encapsulated in a class implementing a standard interface, and then writing an alternate implementation with SPV semantics.
2013-01-04Bitcoin-Qt: never display own block count > estimated block countPhilip Kaufmann
- some users reported it as weird, that the estimated block count could be lower than our own nodes block number (which is indeed true and not good) - this pull adds a new default behaviour, which displays our own block number as estimated block number, if own >= est. block count - the pull raises space for nodes block counts in cPeerBlockCounts to 8 to be more accurate - also removes a reduntant setNumBlocks() call in RPCConsole and moves initialisation of numBlocksAtStartup in ClientModel, where it belongs
2013-01-04New database check routinePieter Wuille
-checklevel gets a new meaning: 0: verify blocks can be read from disk (like before) 1: verify (contextless) block validity (like before) 2: verify undo files can be read and have good checksums 3: verify coin database is consistent with the last few blocks (close to level 6 before) 4: verify all validity rules of the last few blocks Level 3 is the new default, as it's reasonably fast. As level 3 and 4 are implemented using an in-memory rollback of the database, they are limited to as many blocks as possible without exceeding the limits set by -dbcache. The default of -dbcache=25 allows for some 150-200 blocks to be rolled back. In case an error is found, the application quits with a message instructing the user to restart with -reindex. Better instructions, and automatic recovery (when possible) or automatic reindexing are left as future work.
2013-01-03Add checksums to undo dataPieter Wuille
This should be compatible with older code that didn't write checksums.
2013-01-03Make DisconnectBlock fault-tolerantPieter Wuille
2013-01-01Remove 'T' from remaining date/time format strings.Jeff Garzik
2012-12-19changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight
per-tx fee and sigop count data
2012-12-13Merge pull request #2096 from 94m3k1n9/fix-time-formatsPieter Wuille
Change timestamps to use ISO8601 formatting
2012-12-12Merge pull request #2059 from sipa/benchmarkGavin Andresen
Add -benchmark for reporting block processing times
2012-12-12Merge pull request #2062 from sipa/nocoinsGavin Andresen
Reconstruct coins/ database when missing
2012-12-12Merge pull request #2074 from sipa/minorGavin Andresen
Two minor inconvenience fixes
2012-12-12Change timestamps to use ISO8601 formattingRichard Schwab
2012-12-07Merge pull request #2068 from Diapolo/CheckDiskSpacePieter Wuille
some CheckDiskSpace() related changes
2012-12-06Allow lengthy block reconnections to be interruptedPieter Wuille
When the coin database is out of date with the block database, the best block in it is automatically switched to. This reconnection process can take time, so allow it to be interrupted. This also stops block connection as soon as shutdown is requested, leading to a faster shutdown.
2012-12-06Update the block file counter in database when using -reindexPieter Wuille
This problem is like earth (mostly harmless). After/during a -reindex, it means the statistics about the last block file reported in debug.log are always of blk00000.dat instead of the last file. Apart from that, it means a few more database entries need to be read when finding a file to append to the first time.
2012-12-06Reconstruct coins/ from scratch when missing.Pieter Wuille
2012-12-06Merge pull request #2057 from Diapolo/FlushBlockFilePieter Wuille
FlushBlockFile(): check for valid FILE pointer
2012-12-05Merge pull request #2056 from sipa/fix_2052Pieter Wuille
Fixes for obscure mempool-checkpoint interaction
2012-12-05Add -benchmark for reporting block processing timesPieter Wuille
2012-12-05Merge pull request #2063 from Diapolo/CDiskBlockPosPieter Wuille
add 2 constructors in CDiskBlockPos to simplify class usage
2012-12-05call CheckDiskSpace() before pre-allocating spacePhilip Kaufmann
- even if we are allowed to fail pre-allocating, it's better to check for sufficient space before calling AllocateFileRange() and if we are out of disk space return with error() - the above change allows us to remove the CheckDiskSpace() check in CBlock::AcceptBlock()
2012-12-03add 2 constructors in CDiskBlockPos to simplify class usagePhilip Kaufmann
- add a default-constructor, which simply calls SetNull() and a constructor to directly pass nFile and nPos - change code to use that new constructors
2012-12-02Make SetBestChain() atomicPieter Wuille
In case a reorganisation fails, the internal state could become inconsistent (memory only). Previously, a cache per block connect or disconnect action was used, so blocks could not be applied in a partial way. Extend this to a cache for the entire reorganisation, making it atomic entirely. This also simplifies the code a bit.
2012-12-01FlushBlockFile(): check for valid FILE pointerPhilip Kaufmann
- don't call FileCommit() and fclose() if no valid FILE pointer was returned by OpenBlockFile()
2012-11-30Merge pull request #2033 from sipa/kickconflictsPieter Wuille
Bugfix: remove conflicting transactions from memory pool
2012-12-01Only send reorged txn to mempool after checkpointPieter Wuille
2012-11-30Merge pull request #2037 from luke-jr/printpriorityGavin Andresen
Allow -printpriority without -debug
2012-12-01Enable script verification for reorganized mempool txPieter Wuille
2012-11-26Allow -printpriority without -debugLuke Dashjr
2012-11-26update CClientUIInterface and remove orphan Wx stuffPhilip Kaufmann
- fix ThreadSafeMessageBox always displays error icon - allow to specify MSG_ERROR / MSG_WARNING or MSG_INFORMATION without a custom caption / title - allow to specify CClientUIInterface::ICON_ERROR / ICON_WARNING and ICON_INFORMATION (which is default) as message box icon - remove CClientUIInterface::OK from ThreadSafeMessageBox-calls, as the OK button will be set as default, if none is specified - prepend "Bitcoin - " to used captions - rename BitcoinGUI::error() -> BitcoinGUI::message() and add function documentation - change all style parameters and enum flags to unsigned - update code to use that new API - update Client- and WalletModel to use new BitcoinGUI::message() and rename the classes error() method into message() - include the possibility to supply the wanted icon for messages from Client- and WalletModel via "style" parameter
2012-11-25Bugfix: remove conflicting transactions from memory poolPieter Wuille
When a transaction A is in the memory pool, while a transaction B (which shares an input with A) gets accepted into a block, A was kept forever in the memory pool. This commit adds a CTxMemPool::removeConflicts method, which removes transactions that conflict with a given transaction, and all their children. This results in less transactions in the memory pool, and faster construction of new blocks.
2012-11-24Merge pull request #2013 from sipa/blockheaderPieter Wuille
Split off CBlockHeader from CBlock
2012-11-22Merge pull request #1980 from sipa/noreorgsamePieter Wuille
Do not reorganize if new branch has same amount of work
2012-11-17ConnectBlock(): fix error() format to be unsignedPhilip Kaufmann
- I introduced the wrong format macro with my former patch (#2018), this needs to be signed not unsigned (thanks Luke-Jr)
2012-11-16ensure we use our format macros to avoid compilation warningsPhilip Kaufmann
- fixes 2 warnings I observed while compiling on Windows with MinGW
2012-11-15Merge pull request #1670 from luke-jr/blksubstrJeff Garzik
Use full block hash as unique identifier in debug.log
2012-11-15Merge pull request #2005 from Diapolo/fixes_mainJeff Garzik
some small fixes for main.cpp/.h
2012-11-15Merge pull request #2012 from luke-jr/invblk_errsJeff Garzik
Print error for coinbase-pays-too-much case of ConnectBlock failing
2012-11-16Split off CBlockHeader from CBlockPieter Wuille
Cleaner and removes the need for the application-specific flags in serialize.h.
2012-11-15Introduce script verification flagsPieter Wuille
These flags select features to be enabled/disabled during script evaluation/checking, instead of several booleans passed along. Currently these flags are defined: * SCRIPT_VERIFY_P2SH: enable BIP16-style subscript evaluation * SCRIPT_VERIFY_STRICTENC: enforce strict adherence to pubkey/sig encoding standards.
2012-11-14Print error for coinbase-pays-too-much case of ConnectBlock failingLuke Dashjr
2012-11-13Abstract block hash substr extraction (for debug.log) into BlockHashStr inlineLuke Dashjr
2012-11-11some small fixes for main.cpp/.hPhilip Kaufmann
- remove an unwanted ";" at the end of the ~CCoinsView() destructor - in FindBlockPos() and FindUndoPos() only call fclose(), is file is open - fix an error string in the CBlockUndo class
2012-11-10fix some missing indentations in main.cpp for better readabilityPhilip Kaufmann
2012-11-09Add -reindex, to perform in-place reindexing of block chain filesPieter Wuille
Flushes the blktree/ and coins/ databases, and reindexes the block chain files, as if their contents was loaded via -loadblock. Based on earlier work by Jeff Garzik.
2012-11-09Move ThreadImport to init.cppPieter Wuille
2012-11-09LoadExternalBlockFile switched to CBufferedFilePieter Wuille