aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
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-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-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
2012-11-05Do not reorganize if new branch has same amount of workPieter Wuille
2012-11-04Cache size optimizationsPieter Wuille
2012-10-29Remove P2SH transition code: P2SH violations may cause DoS triggerPieter Wuille
2012-10-25Merge pull request #1904 from laanwj/2012_10_remove_getorderPieter Wuille
remove "checkorder" P2P command
2012-10-25Merge pull request #1953 from gmaxwell/createnewblock-racePieter Wuille
Fixes a race condition in CreateNewBlock and a future null deref on testnet.
2012-10-25Merge pull request #1926 from laanwj/2012_10_maindummyboundsWladimir J. van der Laan
Fix out-of-bounds read in main (issue #1924)
2012-10-25Show warning when using prerelease versionWladimir J. van der Laan
Implements #1948 - Add macro `CLIENT_VERSION_IS_RELEASE` to clientversion.h - When running a prerelease (the above macro is `false`): - In UI, show an orange warning bar at the top. This will be used for other warnings (and alerts) as well, instead of the status bar. - For `bitcoind`, show the warning in the "errors" field in `getinfo` response.
2012-10-24Fix out-of-bounds read noticed by Ricardo CorreiaWladimir J. van der Laan
Sizeof() returned the size of a pointer instead of the size of the buffer. Fixes issue #1924.
2012-10-24Fixes a race condition in CreateNewBlock and a future null deref on testnet.Gregory Maxwell
CreateNewBlock was reading pindexBest at the start before taking the lock so it was possible to have the the block content not match the prevheader and this can also trigger a newly added assert in ConnectBlock. I noticed this during a code review after twobitcoins reported that ab91bf39 (BIP30 for all blocks) could cause a null dereference on a modified node that mined during the IBD, or on testnet when it reached heights 91842 and 91880 due to CreateNewBlock calling ConnectBlock with pindex->phashBlock NULL.
2012-10-23Bugfix: actually use CCoinsViewMemPoolPieter Wuille
2012-10-23Added some commentsPieter Wuille
Some clarifications after a code review by Mike Hearn.
2012-10-23Bugfix: off-by-one in priority calculationPieter Wuille
2012-10-23Bugfix: add missing fee checkPieter Wuille
2012-10-23Bugfix: off-by-one error in coinbase maturity checkPieter Wuille
2012-10-21change blockchain -> block chain (spelling)Philip Kaufmann
- Wiki says "block chain" is correct ;) - remove some unneeded spaces I found in the source, while fixing the spelling
2012-10-21remove init messages from ThreadImport()Philip Kaufmann
- remove uiInterface.InitMessage() calls from ThreadImport(), as Qt doesn't like them getting called out of it's main thread and because the thread will continue to run after the GUI was loaded
2012-10-20Add gettxout and gettxoutsetinfo RPCsPieter Wuille
2012-10-20LevelDB block and coin databasesPieter Wuille
Split off CBlockTreeDB and CCoinsViewDB into txdb-*.{cpp,h} files, implemented by either LevelDB or BDB. Based on code from earlier commits by Mike Hearn in his leveldb branch.