mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge pull request #674 from schinzelh/merge_bitcoin_0_10_3
merging Bitcoin 0.10.3 part 1/3
This commit is contained in:
commit
341cf25092
@ -190,6 +190,8 @@ check-local:
|
||||
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
|
||||
endif
|
||||
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
||||
|
||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
|
||||
|
||||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
||||
|
15
configure.ac
15
configure.ac
@ -714,6 +714,21 @@ LIBS_TEMP="$LIBS"
|
||||
CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
|
||||
LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS"
|
||||
AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),)
|
||||
|
||||
AC_MSG_CHECKING(for a supported OpenSSL version)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <openssl/rand.h>
|
||||
]],
|
||||
[[RAND_egd(NULL);]])],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[
|
||||
AC_ARG_WITH([libressl],
|
||||
[AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
|
||||
[AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
|
||||
[AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
|
||||
)]
|
||||
)
|
||||
|
||||
CFLAGS="$CFLAGS_TEMP"
|
||||
LIBS="$LIBS_TEMP"
|
||||
|
||||
|
@ -137,7 +137,7 @@ bitcoin (0.5.3-natty0) natty; urgency=low
|
||||
bitcoin (0.5.2-natty1) natty; urgency=low
|
||||
|
||||
* Remove mentions on anonymity in package descriptions and manpage.
|
||||
These should never have been there, bitcoin isnt anonymous without
|
||||
These should never have been there, bitcoin isn't anonymous without
|
||||
a ton of work that virtually no users will ever be willing and
|
||||
capable of doing
|
||||
|
||||
@ -178,7 +178,7 @@ bitcoin (0.5.0~rc1-natty1) natty; urgency=low
|
||||
|
||||
* Add test_bitcoin to build test
|
||||
* Fix clean
|
||||
* Remove uneccessary build-dependancies
|
||||
* Remove unnecessary build-dependancies
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 26 Oct 2011 14:37:18 -0400
|
||||
|
||||
@ -338,7 +338,7 @@ bitcoin (0.3.20.01~dfsg-1) unstable; urgency=low
|
||||
|
||||
bitcoin (0.3.19~dfsg-6) unstable; urgency=low
|
||||
|
||||
* Fix override agressive optimizations.
|
||||
* Fix override aggressive optimizations.
|
||||
* Fix tighten build-dependencies to really fit backporting to Lenny:
|
||||
+ Add fallback build-dependency on libdb4.6++-dev.
|
||||
+ Tighten unversioned Boost build-dependencies to recent versions,
|
||||
|
2
depends/config.guess
vendored
2
depends/config.guess
vendored
@ -1099,7 +1099,7 @@ EOF
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# prints for the "djgpp" host, or else GDB configure will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
|
12
doc/files.md
12
doc/files.md
@ -1,12 +1,16 @@
|
||||
Used in 0.8.0
|
||||
---------------------
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
* peers.dat: peer IP address database (custom format); since 0.7.0
|
||||
|
||||
* bitcoin.conf: contains configuration settings for bitcoind or bitcoin-qt
|
||||
* bitcoind.pid: stores the process id of bitcoind while running
|
||||
* blocks/blk000??.dat: block data (custom, 128 MiB per file); since 0.8.0
|
||||
* blocks/rev000??.dat; block undo data (custom); since 0.8.0 (format changed since pre-0.8)
|
||||
* blocks/index/*; block index (LevelDB); since 0.8.0
|
||||
* chainstate/*; block chain state database (LevelDB); since 0.8.0
|
||||
* database/*: BDB database environment; only used for wallet since 0.8.0
|
||||
* db.log: wallet database log file
|
||||
* debug.log: contains debug information and general logging generated by bitcoind or bitcoin-qt
|
||||
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation; since 0.10.0
|
||||
* peers.dat: peer IP address database (custom format); since 0.7.0
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
|
||||
Only used in pre-0.8.0
|
||||
---------------------
|
||||
|
@ -8,11 +8,6 @@ CURDIR=$(cd $(dirname "$0"); pwd)
|
||||
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
|
||||
export BITCOIND=${REAL_BITCOIND}
|
||||
|
||||
if [ "x${EXEEXT}" = "x.exe" ]; then
|
||||
echo "Win tests currently disabled"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#Run the tests
|
||||
|
||||
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
|
||||
|
@ -265,7 +265,7 @@ public:
|
||||
* Notice that vvTried, mapAddr and vVector are never encoded explicitly;
|
||||
* they are instead reconstructed from the other information.
|
||||
*
|
||||
* vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change,
|
||||
* vvNew is serialized, but only used if ADDRMAN_UNKNOWN_BUCKET_COUNT didn't change,
|
||||
* otherwise it is reconstructed as well.
|
||||
*
|
||||
* This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
|
||||
|
@ -149,13 +149,14 @@ static void RegisterLoad(const string& strInput)
|
||||
valStr.insert(valStr.size(), buf, bread);
|
||||
}
|
||||
|
||||
if (ferror(f)) {
|
||||
int error = ferror(f);
|
||||
fclose(f);
|
||||
|
||||
if (error) {
|
||||
string strErr = "Error reading file " + filename;
|
||||
throw runtime_error(strErr);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
||||
// evaluate as JSON buffer register
|
||||
RegisterSetJson(key, valStr);
|
||||
}
|
||||
|
@ -58,7 +58,8 @@ CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path& path, size_t nCa
|
||||
} else {
|
||||
if (fWipe) {
|
||||
LogPrintf("Wiping LevelDB in %s\n", path.string());
|
||||
leveldb::DestroyDB(path.string(), options);
|
||||
leveldb::Status result = leveldb::DestroyDB(path.string(), options);
|
||||
HandleError(result);
|
||||
}
|
||||
TryCreateDirectory(path);
|
||||
LogPrintf("Opening LevelDB in %s\n", path.string());
|
||||
|
@ -3358,7 +3358,7 @@ bool AbortNode(const std::string &strMessage, const std::string &userMessage) {
|
||||
strMiscWarning = strMessage;
|
||||
LogPrintf("*** %s\n", strMessage);
|
||||
uiInterface.ThreadSafeMessageBox(
|
||||
userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
|
||||
userMessage.empty() ? _("Error: A fatal internal error occurred, see debug.log for details") : userMessage,
|
||||
"", CClientUIInterface::MSG_ERROR);
|
||||
StartShutdown();
|
||||
return false;
|
||||
|
@ -139,7 +139,7 @@ uint256 CPartialMerkleTree::ExtractMatches(std::vector<uint256> &vMatch) {
|
||||
// traverse the partial tree
|
||||
unsigned int nBitsUsed = 0, nHashUsed = 0;
|
||||
uint256 hashMerkleRoot = TraverseAndExtract(nHeight, 0, nBitsUsed, nHashUsed, vMatch);
|
||||
// verify that no problems occured during the tree traversal
|
||||
// verify that no problems occurred during the tree traversal
|
||||
if (fBad)
|
||||
return 0;
|
||||
// verify that all bits were consumed (except for the padding caused by serializing it as a byte sequence)
|
||||
|
@ -597,7 +597,7 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes)
|
||||
return false;
|
||||
|
||||
if (msg.in_data && msg.hdr.nMessageSize > MAX_PROTOCOL_MESSAGE_LENGTH) {
|
||||
LogPrint("net", "Oversized message from peer=%i, disconnecting", GetId());
|
||||
LogPrint("net", "Oversized message from peer=%i, disconnecting\n", GetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1550,8 +1550,10 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int));
|
||||
#endif
|
||||
// Allow binding if the port is still in TIME_WAIT state after
|
||||
// the program was closed and restarted. Not an issue on windows!
|
||||
// the program was closed and restarted.
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
|
||||
#else
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&nOne, sizeof(int));
|
||||
#endif
|
||||
|
||||
// Set to non-blocking, incoming connections will also inherit this
|
||||
|
@ -947,7 +947,7 @@ std::vector<unsigned char> CNetAddr::GetGroup() const
|
||||
nBits -= 8;
|
||||
}
|
||||
if (nBits > 0)
|
||||
vchRet.push_back(GetByte(15 - nStartByte) | ((1 << nBits) - 1));
|
||||
vchRet.push_back(GetByte(15 - nStartByte) | ((1 << (8 - nBits)) - 1));
|
||||
|
||||
return vchRet;
|
||||
}
|
||||
|
@ -744,6 +744,6 @@ void PaymentServer::setOptionsModel(OptionsModel *optionsModel)
|
||||
|
||||
void PaymentServer::handlePaymentACK(const QString& paymentACKMsg)
|
||||
{
|
||||
// currently we don't futher process or store the paymentACK message
|
||||
// currently we don't further process or store the paymentACK message
|
||||
emit message(tr("Payment acknowledged"), paymentACKMsg, CClientUIInterface::ICON_INFORMATION | CClientUIInterface::MODAL);
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ void RPCConsole::peerLayoutChanged()
|
||||
|
||||
if (detailNodeRow < 0)
|
||||
{
|
||||
// detail node dissapeared from table (node disconnected)
|
||||
// detail node disappeared from table (node disconnected)
|
||||
fUnselect = true;
|
||||
cachedNodeid = -1;
|
||||
ui->peerHeading->setText(tr("Select a peer to view detailed information."));
|
||||
|
@ -658,7 +658,7 @@ void StartRPCThreads()
|
||||
vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v6::any(), defaultPort));
|
||||
vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v4::any(), defaultPort));
|
||||
// Prefer making the socket dual IPv6/IPv4 instead of binding
|
||||
// to both addresses seperately.
|
||||
// to both addresses separately.
|
||||
bBindAny = true;
|
||||
}
|
||||
|
||||
|
@ -766,7 +766,7 @@ Value movecmd(const Array& params, bool fHelp)
|
||||
"3. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
||||
"4. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
|
||||
"\nResult:\n"
|
||||
"true|false (boolean) true if successfull.\n"
|
||||
"true|false (boolean) true if successful.\n"
|
||||
"\nExamples:\n"
|
||||
"\nMove 0.01 btc from the default account to the account named tabby\n"
|
||||
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// //
|
||||
// THE SIMPLE DEFINITON, EXCLUDING DEBUG CODE //
|
||||
// THE SIMPLE DEFINITION, EXCLUDING DEBUG CODE //
|
||||
// //
|
||||
////////////////////////////////////////////////
|
||||
|
||||
|
@ -158,8 +158,8 @@ BOOST_AUTO_TEST_CASE(AlertNotify)
|
||||
{
|
||||
SetMockTime(11);
|
||||
|
||||
boost::filesystem::path temp = GetTempPath() / "alertnotify.txt";
|
||||
boost::filesystem::remove(temp);
|
||||
boost::filesystem::path temp = GetTempPath() /
|
||||
boost::filesystem::unique_path("alertnotify-%%%%.txt");
|
||||
|
||||
mapArgs["-alertnotify"] = std::string("echo %s >> ") + temp.string();
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/assign/list_of.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
using namespace std;
|
||||
@ -145,4 +146,20 @@ BOOST_AUTO_TEST_CASE(subnet_test)
|
||||
BOOST_CHECK(!CSubNet("fuzzy").IsValid());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(netbase_getgroup)
|
||||
{
|
||||
BOOST_CHECK(CNetAddr("127.0.0.1").GetGroup() == boost::assign::list_of(0)); // Local -> !Routable()
|
||||
BOOST_CHECK(CNetAddr("257.0.0.1").GetGroup() == boost::assign::list_of(0)); // !Valid -> !Routable()
|
||||
BOOST_CHECK(CNetAddr("10.0.0.1").GetGroup() == boost::assign::list_of(0)); // RFC1918 -> !Routable()
|
||||
BOOST_CHECK(CNetAddr("169.254.1.1").GetGroup() == boost::assign::list_of(0)); // RFC3927 -> !Routable()
|
||||
BOOST_CHECK(CNetAddr("1.2.3.4").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // IPv4
|
||||
BOOST_CHECK(CNetAddr("::FFFF:0:102:304").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC6145
|
||||
BOOST_CHECK(CNetAddr("64:FF9B::102:304").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC6052
|
||||
BOOST_CHECK(CNetAddr("2002:102:304:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC3964
|
||||
BOOST_CHECK(CNetAddr("2001:0:9999:9999:9999:9999:FEFD:FCFB").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC4380
|
||||
BOOST_CHECK(CNetAddr("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").GetGroup() == boost::assign::list_of((unsigned char)NET_TOR)(239)); // Tor
|
||||
BOOST_CHECK(CNetAddr("2001:470:abcd:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV6)(32)(1)(4)(112)(175)); //he.net
|
||||
BOOST_CHECK(CNetAddr("2001:2001:9999:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV6)(32)(1)(32)(1)); //IPv6
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user