aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
AgeCommit message (Collapse)Author
2012-08-26Block height in coinbase as a new block ruleGavin Andresen
"Version 2" blocks are blocks that have nVersion=2 and have the block height as the first item in their coinbase. Block-height-in-the-coinbase is strictly enforced when version=2 blocks are a supermajority in the block chain (750 of the last 1,000 blocks on main net, 51 of 100 for testnet). This does not affect old clients/miners at all, which will continue producing nVersion=1 blocks, and which will continue to be valid.
2012-08-26Add CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION constants.Gavin Andresen
Partial of upstream dae3e10a5abe93833c57183b7c00f1db9200f46e
2012-08-12Bugfix: Use standard BTC unit in commentsLuke Dashjr
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-12Bugfix: Move IsStandard scriptSig size check out of IsPushOnly, since BIP16 ↵Luke Dashjr
verification uses the latter too This caused clients to reject block #177618 since it has a P2SH transaction with over 200 bytes in scriptSig. (Upstream commit: e679ec969c8b22c676ebb10bea1038f6c8f13b33)
2012-05-22Prevent crashes due to missing or corrupted blk????.dat recordsJeff Garzik
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-04-24CBlock::WriteToDisk() properly checks ftell(3) for error returnJeff Garzik
Rather than storing ftell(3)'s return value -- a long -- in an unsigned int, we store and check a properly typed temp. Then, assured a non-negative value, we store in nBlockPosRet.
2012-04-17Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
2012-04-15fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan
2012-03-21Merge branch 'bip16_0.4.x' into 0.4.xLuke Dashjr
2012-03-20Minimal support for validating BIP16 pay-to-script-hash transactionsLuke Dashjr
Note this does NOT include accepting them in blocks (making them standard)
2012-03-16Fix issue #848 : broken mining on testnetGavin Andresen
2012-03-02DoS fix for mapOrphanTransactionsGavin Andresen
2012-02-07Update copyrights to 2012 for files modified this yearLuke Dashjr
2012-02-02Only store transactions with missing inputs in the orphan pool.Gavin Andresen
All previous versions of bitcoin could store some types of invalid transactions in the orphan-transaction list.
2011-12-01Orphan block fill-up-memory attack preventionGavin Andresen
2011-12-01Moved checkpoints out of main, to prep for using them to help prevent DoS ↵Gavin Andresen
attacks
2011-09-07Merge branch 'unique_coinbase' of ↵Gavin Andresen
git://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin into unique_coinbase
2011-09-06Bugfix: Use timestamp in coinbase rather than "bits", needed to ensure ↵Luke Dashjr
coinbase txn is unique even if address is the same
2011-08-19Start moving protocol-specific code to protocol.[ch]ppGiel van Schijndel
Move CMessageHeader from net.h to protocol.[ch]pp, with the implementation in the .cpp compilation unit (compiling once is enough). This commit does *not* and should not modify *any* code, it only moves it from net.h and splits it across protocol.cpp and protocol.hpp. Indentation changes aside the closest thing to a modification of code is the addition of the 'TODO' comment (the execution of which requires code modifications and thus doesn't belong in this commit). Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-19Make some global variables less-global (static)Giel van Schijndel
Explicitly make these global variables less-global to reduce the maximum scope of this global state. In my experience global variables tend to be a major source of bugs. As such the less accessible they are the less likely they are to be the source of a bug. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-09Unify copyright notices.Matt Corallo
To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
2011-07-17get rid of mapPubKeysPieter Wuille
Make CKeyStore's interface work on uint160's instead of pubkeys, so no separate global mapPubKeys is necessary anymore.
2011-07-12Merge pull request #352 from TheBlueMatt/newencJeff Garzik
Wallet Private Key Encryption (on CWallet)
2011-07-13Make an invalid addrIncoming so that old clients crash.Matt Corallo
This prevents old clients from opening, and thus corrupting or otherwise causing harm to encrypted wallets.
2011-07-09remove magic number: change threshold for nLockTime to constantWladimir J. van der Laan
2011-06-24Merge branch 'totalblocksestimate1' of https://github.com/laanwj/bitcoinGavin Andresen
2011-06-19add GetTotalBlocksEstimate() function, move magic number to constantWladimir J. van der Laan
2011-06-15CWallet classPieter Wuille
* A new class CKeyStore manages private keys, and script.cpp depends on access to CKeyStore. * A new class CWallet extends CKeyStore, and contains all former wallet-specific globals; CWallet depends on script.cpp, not the other way around. * Wallet-specific functions in CTransaction/CTxIn/CTxOut (GetDebit, GetCredit, GetChange, IsMine, IsFromMe), are moved to CWallet, taking their former 'this' argument as an explicit parameter * CWalletTx objects know which CWallet they belong to, for convenience, so they have their own direct (and caching) GetDebit/... functions. * Some code was moved from CWalletDB to CWallet, such as handling of reserve keys. * Main.cpp keeps a set of all 'registered' wallets, which should be informed about updates to the block chain, and does not have any notion about any 'main' wallet. Function in main.cpp that require a wallet (such as GenerateCoins), take an explicit CWallet* argument. * The actual CWallet instance used by the application is defined in init.cpp as "CWallet* pwalletMain". rpc.cpp and ui.cpp use this variable. * Functions in main.cpp and db.cpp that are not used by other modules are marked static. * The code for handling the 'submitorder' message is removed, as it not really compatible with the idea that a node is independent from the wallet(s) connected to it, and obsolete anyway.
2011-06-15move wallet code to separate filePieter Wuille
This introduces two new source files, keystore.cpp and wallet.cpp with corresponding headers. Code is moved from main and db, in a preparation for a follow-up commit which introduces the classes CWallet and CKeyStore.
2011-06-14Merge pull request #226 from jordanlewis/betterheadersJeff Garzik
Optimize header dependencies; improve Makefile dependency graph
2011-06-12Faster timeout when connectingPieter Wuille
Use non-blocking connects, and a select() call to wait a predefined time (5s by default, but configurable with -timeout) for either success or failure. This allows much more connections to be tried per time unit. Based on a patch by phantomcircuit.
2011-06-10Lower minimum relay TX fee to 0.0001 (from 0.0005) BTC.Jeff Garzik
2011-06-05Reduce minimum TX fee for new transactions, to 0.0005.Jeff Garzik
2011-06-05Merge pull request #255 from sipa/rescanupdateJeff Garzik
Update transactions already in the wallet when rescanning.
2011-05-26Separate required fee for relaying and creationPieter Wuille
Transactions created with the new minimal fee policy would not be relayed by the network. Therefore, we separate the minimal fee that is necessary to relay and to create, leaving the creation one at the old amount, for now.
2011-05-22Update transactions already in the wallet when rescanning.Pieter Wuille
When rescanning, if the scanned transaction is already in the wallet, it is skipped. However, if someone sends a transaction, does not wait for confirmation, switches wallets, waits for a block that contains his original transaction, and switches wallets again, a rescan will leave his wallet transaction (which has no merkle branch, so no confirmations) untouched.
2011-05-15Only include net.h when we have toJordan Lewis
2011-05-15Only include db.h when we have to.Jordan Lewis
2011-05-15make bitcoin include files more modularWladimir J. van der Laan
2011-05-11Decrease minimum TX fee to 0.0005 BTC.Jeff Garzik
2011-05-11Replace CENT with new constant MIN_TX_FEE, where appropriate.Jeff Garzik
MIN_TX_FEE==CENT remains true (until next commit).
2011-05-09Manual merge of jaromil's source tree reorg commit.Jeff Garzik
Conflicts: src/sha256.cpp
2011-04-23directory re-organization (keeps the old build system)Jaromil
there is no internal modification of any file in this commit files are moved into directories according to established standards in sourcecode distribution; these directories contain: src - Files that are used in constructing the executable binaries, but are not installed. doc - Files in HTML and text format that document usage, quirks of the implementation, and contributor checklists. locale - Files that contain human language translation of strings used in the program contrib - Files contributed from distributions or other third party implementing scripts and auxiliary programs