Merge pull request #6135

f13dac9 Comment edits and cleanup (BitcoinPRReadingGroup)
ff734e9 Alphabetic order in makefile (Jorge Timón)
5207f33 fix header include groups (Philip Kaufmann)
59b149f remove unneeded incude of wallet/db.h from rpcmining.cpp (Philip Kaufmann)
3703385 remove unused classes from db.h (Philip Kaufmann)
0a7bcb7 fix IDE/compiler warning "extra ';'" in validationinterface.h (Philip Kaufmann)
3b00e7c [Trivial] Update COPYING (sandakersmann)
dd9e688 Trivial: Corrected owner of DNS seeder (ayeowch)
a60bfd8 [init] better message when no wallet support is compiled in (Philip Kaufmann)
78f44b6 Capitalized P2P (sandakersmann)
8e9248d [Trivial] Cryptocurrency is one word (sandakersmann)
803f51e Typo in GetRawMemPool RPC method help: "]" --> "}" (Chris Arnesen)
605a735 addrman: update comments (Pavel Vasin)
This commit is contained in:
Wladimir J. van der Laan 2015-05-15 13:54:32 +02:00
commit e47c94e64c
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
13 changed files with 48 additions and 53 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2009-2015 Bitcoin Developers Copyright (c) 2009-2015 The Bitcoin Core developers
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -19,7 +19,7 @@ BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}" BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
name="Bitcoin Core Daemon" name="Bitcoin Core Daemon"
description="Bitcoin crypto-currency p2p network daemon" description="Bitcoin cryptocurrency P2P network daemon"
command="/usr/bin/bitcoind" command="/usr/bin/bitcoind"
command_args="-pid=\"${BITCOIND_PIDFILE}\" \ command_args="-pid=\"${BITCOIND_PIDFILE}\" \

View File

@ -77,8 +77,8 @@ BITCOIN_CORE_H = \
base58.h \ base58.h \
bloom.h \ bloom.h \
chain.h \ chain.h \
chainparamsbase.h \
chainparams.h \ chainparams.h \
chainparamsbase.h \
chainparamsseeds.h \ chainparamsseeds.h \
checkpoints.h \ checkpoints.h \
checkqueue.h \ checkqueue.h \
@ -86,11 +86,13 @@ BITCOIN_CORE_H = \
coincontrol.h \ coincontrol.h \
coins.h \ coins.h \
compat.h \ compat.h \
compat/byteswap.h \
compat/endian.h \
compat/sanity.h \
compressor.h \ compressor.h \
consensus/consensus.h \ consensus/consensus.h \
consensus/params.h \ consensus/params.h \
core_io.h \ core_io.h \
wallet/db.h \
eccryptoverify.h \ eccryptoverify.h \
ecwrapper.h \ ecwrapper.h \
hash.h \ hash.h \
@ -104,8 +106,8 @@ BITCOIN_CORE_H = \
merkleblock.h \ merkleblock.h \
miner.h \ miner.h \
mruset.h \ mruset.h \
netbase.h \
net.h \ net.h \
netbase.h \
noui.h \ noui.h \
policy/fees.h \ policy/fees.h \
pow.h \ pow.h \
@ -119,8 +121,8 @@ BITCOIN_CORE_H = \
rpcserver.h \ rpcserver.h \
scheduler.h \ scheduler.h \
script/interpreter.h \ script/interpreter.h \
script/script_error.h \
script/script.h \ script/script.h \
script/script_error.h \
script/sigcache.h \ script/sigcache.h \
script/sign.h \ script/sign.h \
script/standard.h \ script/standard.h \
@ -146,12 +148,10 @@ BITCOIN_CORE_H = \
validationinterface.h \ validationinterface.h \
version.h \ version.h \
wallet/crypter.h \ wallet/crypter.h \
wallet/walletdb.h \ wallet/db.h \
wallet/wallet.h \ wallet/wallet.h \
wallet/wallet_ismine.h \ wallet/wallet_ismine.h \
compat/byteswap.h \ wallet/walletdb.h
compat/endian.h \
compat/sanity.h
JSON_H = \ JSON_H = \
json/json_spirit.h \ json/json_spirit.h \
@ -218,39 +218,37 @@ libbitcoin_wallet_a_SOURCES = \
# crypto primitives library # crypto primitives library
crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES) crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
crypto_libbitcoin_crypto_a_SOURCES = \ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha1.cpp \
crypto/sha256.cpp \
crypto/sha512.cpp \
crypto/hmac_sha256.cpp \
crypto/hmac_sha512.cpp \
crypto/ripemd160.cpp \
crypto/common.h \ crypto/common.h \
crypto/sha256.h \ crypto/hmac_sha256.cpp \
crypto/sha512.h \
crypto/hmac_sha256.h \ crypto/hmac_sha256.h \
crypto/hmac_sha512.cpp \
crypto/hmac_sha512.h \ crypto/hmac_sha512.h \
crypto/ripemd160.cpp \
crypto/ripemd160.h \
crypto/sha1.cpp \
crypto/sha1.h \ crypto/sha1.h \
crypto/ripemd160.h crypto/sha256.cpp \
crypto/sha256.h \
crypto/sha512.cpp \
crypto/sha512.h
# univalue JSON library # univalue JSON library
univalue_libbitcoin_univalue_a_SOURCES = \ univalue_libbitcoin_univalue_a_SOURCES = \
univalue/univalue.cpp \ univalue/univalue.cpp \
univalue/univalue_read.cpp \ univalue/univalue.h \
univalue/univalue_write.cpp \
univalue/univalue_escapes.h \ univalue/univalue_escapes.h \
univalue/univalue.h univalue/univalue_read.cpp \
univalue/univalue_write.cpp
# common: shared between bitcoind, and bitcoin-qt and non-server tools # common: shared between bitcoind, and bitcoin-qt and non-server tools
libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES) libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_common_a_SOURCES = \ libbitcoin_common_a_SOURCES = \
arith_uint256.cpp \
amount.cpp \ amount.cpp \
arith_uint256.cpp \
base58.cpp \ base58.cpp \
chainparams.cpp \ chainparams.cpp \
coins.cpp \ coins.cpp \
compressor.cpp \ compressor.cpp \
primitives/block.cpp \
primitives/transaction.cpp \
core_read.cpp \ core_read.cpp \
core_write.cpp \ core_write.cpp \
eccryptoverify.cpp \ eccryptoverify.cpp \
@ -259,14 +257,16 @@ libbitcoin_common_a_SOURCES = \
key.cpp \ key.cpp \
keystore.cpp \ keystore.cpp \
netbase.cpp \ netbase.cpp \
primitives/block.cpp \
primitives/transaction.cpp \
protocol.cpp \ protocol.cpp \
pubkey.cpp \ pubkey.cpp \
scheduler.cpp \ scheduler.cpp \
script/interpreter.cpp \ script/interpreter.cpp \
script/script.cpp \ script/script.cpp \
script/script_error.cpp \
script/sign.cpp \ script/sign.cpp \
script/standard.cpp \ script/standard.cpp \
script/script_error.cpp \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
# util: shared between all executables. # util: shared between all executables.

View File

@ -110,10 +110,10 @@ public:
* *
* To that end: * To that end:
* * Addresses are organized into buckets. * * Addresses are organized into buckets.
* * Address that have not yet been tried go into 1024 "new" buckets. * * Addresses that have not yet been tried go into 1024 "new" buckets.
* * Based on the address range (/16 for IPv4) of source of the information, 64 buckets are selected at random * * Based on the address range (/16 for IPv4) of the source of information, 64 buckets are selected at random.
* * The actual bucket is chosen from one of these, based on the range in which the address itself is located. * * The actual bucket is chosen from one of these, based on the range in which the address itself is located.
* * One single address can occur in up to 8 different buckets, to increase selection chances for addresses that * * One single address can occur in up to 8 different buckets to increase selection chances for addresses that
* are seen frequently. The chance for increasing this multiplicity decreases exponentially. * are seen frequently. The chance for increasing this multiplicity decreases exponentially.
* * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen * * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen
* ones) is removed from it first. * ones) is removed from it first.
@ -231,7 +231,6 @@ protected:
void Attempt_(const CService &addr, int64_t nTime); void Attempt_(const CService &addr, int64_t nTime);
//! Select an address to connect to. //! Select an address to connect to.
//! nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100)
CAddrInfo Select_(); CAddrInfo Select_();
#ifdef DEBUG_ADDRMAN #ifdef DEBUG_ADDRMAN
@ -532,7 +531,6 @@ public:
/** /**
* Choose an address to connect to. * Choose an address to connect to.
* nUnkBias determines how much "new" entries are favored over "tried" ones (0-100).
*/ */
CAddrInfo Select() CAddrInfo Select()
{ {

View File

@ -86,7 +86,7 @@ public:
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Addy Yeow vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli

View File

@ -1335,7 +1335,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", true)); pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", true));
} // (!fDisableWallet) } // (!fDisableWallet)
#else // ENABLE_WALLET #else // ENABLE_WALLET
LogPrintf("No wallet compiled in!\n"); LogPrintf("No wallet support compiled in!\n");
#endif // !ENABLE_WALLET #endif // !ENABLE_WALLET
// ********************************************************* Step 9: import blocks // ********************************************************* Step 9: import blocks

View File

@ -170,7 +170,7 @@ Value getrawmempool(const Array& params, bool fHelp)
" \"transactionid\", (string) parent transaction id\n" " \"transactionid\", (string) parent transaction id\n"
" ... ]\n" " ... ]\n"
" }, ...\n" " }, ...\n"
"]\n" "}\n"
"\nExamples\n" "\nExamples\n"
+ HelpExampleCli("getrawmempool", "true") + HelpExampleCli("getrawmempool", "true")
+ HelpExampleRpc("getrawmempool", "true") + HelpExampleRpc("getrawmempool", "true")

View File

@ -16,7 +16,6 @@
#include "util.h" #include "util.h"
#include "validationinterface.h" #include "validationinterface.h"
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
#include "wallet/db.h"
#include "wallet/wallet.h" #include "wallet/wallet.h"
#endif #endif

View File

@ -6,6 +6,8 @@
#ifndef BITCOIN_SCRIPT_SCRIPT_H #ifndef BITCOIN_SCRIPT_SCRIPT_H
#define BITCOIN_SCRIPT_SCRIPT_H #define BITCOIN_SCRIPT_SCRIPT_H
#include "crypto/common.h"
#include <assert.h> #include <assert.h>
#include <climits> #include <climits>
#include <limits> #include <limits>
@ -14,7 +16,6 @@
#include <string.h> #include <string.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include "crypto/common.h"
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes

View File

@ -6,6 +6,8 @@
#ifndef BITCOIN_SERIALIZE_H #ifndef BITCOIN_SERIALIZE_H
#define BITCOIN_SERIALIZE_H #define BITCOIN_SERIALIZE_H
#include "compat/endian.h"
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
#include <ios> #include <ios>
@ -18,8 +20,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "compat/endian.h"
class CScript; class CScript;
static const unsigned int MAX_SIZE = 0x02000000; static const unsigned int MAX_SIZE = 0x02000000;

View File

@ -7,11 +7,6 @@
#include "config/bitcoin-config.h" #include "config/bitcoin-config.h"
#endif #endif
#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
#include <pthread.h>
#include <pthread_np.h>
#endif
#include "util.h" #include "util.h"
#include "chainparamsbase.h" #include "chainparamsbase.h"
@ -23,6 +18,11 @@
#include <stdarg.h> #include <stdarg.h>
#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
#include <pthread.h>
#include <pthread_np.h>
#endif
#ifndef WIN32 #ifndef WIN32
// for posix_fallocate // for posix_fallocate
#ifdef __linux__ #ifdef __linux__

View File

@ -28,13 +28,13 @@ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL);
class CValidationInterface { class CValidationInterface {
protected: protected:
virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {}; virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {}
virtual void EraseFromWallet(const uint256 &hash) {}; virtual void EraseFromWallet(const uint256 &hash) {}
virtual void SetBestChain(const CBlockLocator &locator) {}; virtual void SetBestChain(const CBlockLocator &locator) {}
virtual void UpdatedTransaction(const uint256 &hash) {}; virtual void UpdatedTransaction(const uint256 &hash) {}
virtual void Inventory(const uint256 &hash) {}; virtual void Inventory(const uint256 &hash) {}
virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}; virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}
virtual void BlockChecked(const CBlock&, const CValidationState&) {}; virtual void BlockChecked(const CBlock&, const CValidationState&) {}
friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces(); friend void ::UnregisterAllValidationInterfaces();

View File

@ -20,9 +20,6 @@
#include <db_cxx.h> #include <db_cxx.h>
class CDiskBlockIndex;
class COutPoint;
extern unsigned int nWalletDBUpdated; extern unsigned int nWalletDBUpdated;
class CDBEnv class CDBEnv