diff --git a/COPYING b/COPYING index 9fd326662..cae0f5b6f 100644 --- a/COPYING +++ b/COPYING @@ -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 of this software and associated documentation files (the "Software"), to deal diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc index b0ac5e31e..a94f03680 100644 --- a/contrib/init/bitcoind.openrc +++ b/contrib/init/bitcoind.openrc @@ -19,7 +19,7 @@ BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}} BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}" name="Bitcoin Core Daemon" -description="Bitcoin crypto-currency p2p network daemon" +description="Bitcoin cryptocurrency P2P network daemon" command="/usr/bin/bitcoind" command_args="-pid=\"${BITCOIND_PIDFILE}\" \ diff --git a/src/Makefile.am b/src/Makefile.am index 91d530222..93ad26acf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -77,8 +77,8 @@ BITCOIN_CORE_H = \ base58.h \ bloom.h \ chain.h \ - chainparamsbase.h \ chainparams.h \ + chainparamsbase.h \ chainparamsseeds.h \ checkpoints.h \ checkqueue.h \ @@ -86,11 +86,13 @@ BITCOIN_CORE_H = \ coincontrol.h \ coins.h \ compat.h \ + compat/byteswap.h \ + compat/endian.h \ + compat/sanity.h \ compressor.h \ consensus/consensus.h \ consensus/params.h \ core_io.h \ - wallet/db.h \ eccryptoverify.h \ ecwrapper.h \ hash.h \ @@ -104,8 +106,8 @@ BITCOIN_CORE_H = \ merkleblock.h \ miner.h \ mruset.h \ - netbase.h \ net.h \ + netbase.h \ noui.h \ policy/fees.h \ pow.h \ @@ -119,8 +121,8 @@ BITCOIN_CORE_H = \ rpcserver.h \ scheduler.h \ script/interpreter.h \ - script/script_error.h \ script/script.h \ + script/script_error.h \ script/sigcache.h \ script/sign.h \ script/standard.h \ @@ -146,12 +148,10 @@ BITCOIN_CORE_H = \ validationinterface.h \ version.h \ wallet/crypter.h \ - wallet/walletdb.h \ + wallet/db.h \ wallet/wallet.h \ wallet/wallet_ismine.h \ - compat/byteswap.h \ - compat/endian.h \ - compat/sanity.h + wallet/walletdb.h JSON_H = \ json/json_spirit.h \ @@ -218,39 +218,37 @@ libbitcoin_wallet_a_SOURCES = \ # crypto primitives library crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES) 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/sha256.h \ - crypto/sha512.h \ + crypto/hmac_sha256.cpp \ crypto/hmac_sha256.h \ + crypto/hmac_sha512.cpp \ crypto/hmac_sha512.h \ + crypto/ripemd160.cpp \ + crypto/ripemd160.h \ + crypto/sha1.cpp \ crypto/sha1.h \ - crypto/ripemd160.h + crypto/sha256.cpp \ + crypto/sha256.h \ + crypto/sha512.cpp \ + crypto/sha512.h # univalue JSON library univalue_libbitcoin_univalue_a_SOURCES = \ univalue/univalue.cpp \ - univalue/univalue_read.cpp \ - univalue/univalue_write.cpp \ + univalue/univalue.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 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES) libbitcoin_common_a_SOURCES = \ - arith_uint256.cpp \ amount.cpp \ + arith_uint256.cpp \ base58.cpp \ chainparams.cpp \ coins.cpp \ compressor.cpp \ - primitives/block.cpp \ - primitives/transaction.cpp \ core_read.cpp \ core_write.cpp \ eccryptoverify.cpp \ @@ -259,14 +257,16 @@ libbitcoin_common_a_SOURCES = \ key.cpp \ keystore.cpp \ netbase.cpp \ + primitives/block.cpp \ + primitives/transaction.cpp \ protocol.cpp \ pubkey.cpp \ scheduler.cpp \ script/interpreter.cpp \ script/script.cpp \ + script/script_error.cpp \ script/sign.cpp \ script/standard.cpp \ - script/script_error.cpp \ $(BITCOIN_CORE_H) # util: shared between all executables. diff --git a/src/addrman.h b/src/addrman.h index b72dda49d..373b0f39f 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -110,10 +110,10 @@ public: * * To that end: * * Addresses are organized into buckets. - * * Address 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 + * * Addresses that have not yet been tried go into 1024 "new" buckets. + * * 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. - * * 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. * * 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. @@ -231,7 +231,6 @@ protected: void Attempt_(const CService &addr, int64_t nTime); //! Select an address to connect to. - //! nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100) CAddrInfo Select_(); #ifdef DEBUG_ADDRMAN @@ -532,7 +531,6 @@ public: /** * Choose an address to connect to. - * nUnkBias determines how much "new" entries are favored over "tried" ones (0-100). */ CAddrInfo Select() { diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 556d0aed4..5f400b265 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -86,7 +86,7 @@ public: 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("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("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli diff --git a/src/init.cpp b/src/init.cpp index 2d7585025..3c3b3fb23 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1335,7 +1335,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", true)); } // (!fDisableWallet) #else // ENABLE_WALLET - LogPrintf("No wallet compiled in!\n"); + LogPrintf("No wallet support compiled in!\n"); #endif // !ENABLE_WALLET // ********************************************************* Step 9: import blocks diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index ecf8e8bcc..4315c5ec1 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -170,7 +170,7 @@ Value getrawmempool(const Array& params, bool fHelp) " \"transactionid\", (string) parent transaction id\n" " ... ]\n" " }, ...\n" - "]\n" + "}\n" "\nExamples\n" + HelpExampleCli("getrawmempool", "true") + HelpExampleRpc("getrawmempool", "true") diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 24b865150..a6a8b9422 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -16,7 +16,6 @@ #include "util.h" #include "validationinterface.h" #ifdef ENABLE_WALLET -#include "wallet/db.h" #include "wallet/wallet.h" #endif diff --git a/src/script/script.h b/src/script/script.h index ed456f5c5..d5045005b 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -6,6 +6,8 @@ #ifndef BITCOIN_SCRIPT_SCRIPT_H #define BITCOIN_SCRIPT_SCRIPT_H +#include "crypto/common.h" + #include #include #include @@ -14,7 +16,6 @@ #include #include #include -#include "crypto/common.h" static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes diff --git a/src/serialize.h b/src/serialize.h index 741f78f8b..53d8af142 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -6,6 +6,8 @@ #ifndef BITCOIN_SERIALIZE_H #define BITCOIN_SERIALIZE_H +#include "compat/endian.h" + #include #include #include @@ -18,8 +20,6 @@ #include #include -#include "compat/endian.h" - class CScript; static const unsigned int MAX_SIZE = 0x02000000; diff --git a/src/util.cpp b/src/util.cpp index da5b259ae..bfb95c904 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7,11 +7,6 @@ #include "config/bitcoin-config.h" #endif -#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) -#include -#include -#endif - #include "util.h" #include "chainparamsbase.h" @@ -23,6 +18,11 @@ #include +#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) +#include +#include +#endif + #ifndef WIN32 // for posix_fallocate #ifdef __linux__ diff --git a/src/validationinterface.h b/src/validationinterface.h index b4c93d72c..2a4c7ecce 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -28,13 +28,13 @@ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL); class CValidationInterface { protected: - virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {}; - virtual void EraseFromWallet(const uint256 &hash) {}; - virtual void SetBestChain(const CBlockLocator &locator) {}; - virtual void UpdatedTransaction(const uint256 &hash) {}; - virtual void Inventory(const uint256 &hash) {}; - virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}; - virtual void BlockChecked(const CBlock&, const CValidationState&) {}; + virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {} + virtual void EraseFromWallet(const uint256 &hash) {} + virtual void SetBestChain(const CBlockLocator &locator) {} + virtual void UpdatedTransaction(const uint256 &hash) {} + virtual void Inventory(const uint256 &hash) {} + virtual void ResendWalletTransactions(int64_t nBestBlockTime) {} + virtual void BlockChecked(const CBlock&, const CValidationState&) {} friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*); friend void ::UnregisterAllValidationInterfaces(); diff --git a/src/wallet/db.h b/src/wallet/db.h index 9596723b2..2df6f6e5a 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -20,9 +20,6 @@ #include -class CDiskBlockIndex; -class COutPoint; - extern unsigned int nWalletDBUpdated; class CDBEnv