Age | Commit message (Collapse) | Author |
|
Denial-of-service prevention
|
|
|
|
|
|
blocks as initial value for number of peer blocks
|
|
git://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin into unique_coinbase
|
|
coinbase txn is unique even if address is the same
|
|
|
|
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>
|
|
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>
|
|
To a variation on:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2011 The Bitcoin developers
|
|
Make CKeyStore's interface work on uint160's instead of pubkeys, so
no separate global mapPubKeys is necessary anymore.
|
|
Wallet Private Key Encryption (on CWallet)
|
|
This prevents old clients from opening, and thus corrupting
or otherwise causing harm to encrypted wallets.
|
|
|
|
|
|
|
|
* 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.
|
|
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.
|
|
Optimize header dependencies; improve Makefile dependency graph
|
|
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.
|
|
|
|
|
|
Update transactions already in the wallet when rescanning.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
MIN_TX_FEE==CENT remains true (until next commit).
|
|
Conflicts:
src/sha256.cpp
|
|
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
|