From 6723c9ea107116926f5dfb9d6e5b86c0a5342bc4 Mon Sep 17 00:00:00 2001 From: vertoe Date: Sat, 6 Dec 2014 16:42:40 +0100 Subject: [PATCH 01/11] Update private key versions. --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 16df50d33967e..5b8b8aa4ffc85 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -67,7 +67,7 @@ class CMainParams : public CChainParams { base58Prefixes[PUBKEY_ADDRESS] = list_of(76); // Darkcoin addresses start with X base58Prefixes[SCRIPT_ADDRESS] = list_of(5); - base58Prefixes[SECRET_KEY] = list_of(128); + base58Prefixes[SECRET_KEY] = list_of(204); base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E); base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4); @@ -133,7 +133,7 @@ class CTestNetParams : public CMainParams { base58Prefixes[PUBKEY_ADDRESS] = list_of(138); // Testnet v4 addresses start with x base58Prefixes[SCRIPT_ADDRESS] = list_of(196); - base58Prefixes[SECRET_KEY] = list_of(239); + base58Prefixes[SECRET_KEY] = list_of(266); base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF); base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94); } From 8003eb484e097231ad6e828182ff1166025fa85d Mon Sep 17 00:00:00 2001 From: vertoe Date: Sat, 6 Dec 2014 22:56:38 +0100 Subject: [PATCH 02/11] Fix internal wallet miner. --- TODO.md | 3 ++- src/main.cpp | 14 +++--------- src/miner.cpp | 61 +++++++-------------------------------------------- 3 files changed, 13 insertions(+), 65 deletions(-) diff --git a/TODO.md b/TODO.md index afdb0749346fe..c4c8d667516fa 100644 --- a/TODO.md +++ b/TODO.md @@ -23,13 +23,14 @@ DONE: - Reset testnet (v4) with new genesis and address version (start with x) - BIP0032 addresses xpub and xpriv start with x (unchanged by design) - Changed Darkcoin units to DRK and added duffs +- Fixed internal walletminer MANDATORY: ---------- -- Add masternode payment checks a.k.a. enforcement (based on blockheight) - Fix mining protocol to include correct pow and masternodes +- Add masternode payment checks a.k.a. enforcement (based on blockheight) OPTIONAL: diff --git a/src/main.cpp b/src/main.cpp index b199bcebf6641..7bc01201c25e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1447,14 +1447,12 @@ unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockH unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock) { - uint retarget = DIFF_BTC; + uint retarget = DIFF_DGW; - if (TestNet()) { - if (pindexLast->nHeight + 1 >= 256) retarget = DIFF_DGW; - } - else { + if (!TestNet()) { if (pindexLast->nHeight + 1 >= 34140) retarget = DIFF_DGW; else if (pindexLast->nHeight + 1 >= 15200) retarget = DIFF_KGW; + else retarget = DIFF_BTC; } // Default Bitcoin style retargeting @@ -1498,14 +1496,11 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead // Go back by what we want to be 14 days worth of blocks const CBlockIndex* pindexFirst = pindexLast; for (int i = 0; pindexFirst && i < blockstogoback; i++) - //for (int i = 0; pindexFirst && i < nInterval-1; i++) pindexFirst = pindexFirst->pprev; assert(pindexFirst); // Limit adjustment step - //int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime(); int64_t nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime(); - //LogPrintf(" nActualTimespan = %"PRI64d" before bounds\n", nActualTimespan); LogPrintf(" nActualTimespan = %d before bounds\n", nActualTimespan); if (nActualTimespan < nTargetTimespan/4) nActualTimespan = nTargetTimespan/4; @@ -1523,11 +1518,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead /// debug print LogPrintf("GetNextWorkRequired RETARGET\n"); - //LogPrintf("nTargetTimespan = %"PRI64d" nActualTimespan = %"PRI64d"\n", nTargetTimespan, nActualTimespan); LogPrintf("nTargetTimespan = %d nActualTimespan = %d\n", nTargetTimespan, nActualTimespan); - //LogPrintf("Before: %08x %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString().c_str()); LogPrintf("Before: %08x %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString()); - //LogPrintf("After: %08x %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString().c_str()); LogPrintf("After: %08x %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString()); return bnNew.GetCompact(); diff --git a/src/miner.cpp b/src/miner.cpp index 42acb35b70019..5354b9741673c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -416,41 +416,6 @@ void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash double dHashesPerSec = 0.0; int64_t nHPSTimerStart = 0; -// -// ScanHash scans nonces looking for a hash with at least some zero bits. -// It operates on big endian data. Caller does the byte reversing. -// All input buffers are 16-byte aligned. nNonce is usually preserved -// between calls, but periodically or if nNonce is 0xffff0000 or above, -// the block is rebuilt and nNonce starts over at zero. -// -unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1, char* phash, unsigned int& nHashesDone) -{ - unsigned int& nNonce = *(unsigned int*)(pdata + 12); - for (;;) - { - // Crypto++ SHA256 - // Hash pdata using pmidstate as the starting state into - // pre-formatted buffer phash1, then hash phash1 into phash - nNonce++; - SHA256Transform(phash1, pdata, pmidstate); - SHA256Transform(phash, phash1, pSHA256InitState); - - // Return the nonce if the hash has at least some zero bits, - // caller will check if it has enough to reach the target - if (((unsigned short*)phash)[14] == 0) - return nNonce; - - // If nothing found after trying for a while, return -1 - if ((nNonce & 0xffff) == 0) - { - nHashesDone = 0xffff+1; - return (unsigned int) -1; - } - if ((nNonce & 0xfff) == 0) - boost::this_thread::interruption_point(); - } -} - CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; @@ -543,37 +508,23 @@ void static BitcoinMiner(CWallet *pwallet) unsigned int& nBlockTime = *(unsigned int*)(pdata + 64 + 4); unsigned int& nBlockBits = *(unsigned int*)(pdata + 64 + 8); - unsigned int& nBlockNonce = *(unsigned int*)(pdata + 64 + 12); - // // Search // int64_t nStart = GetTime(); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); - uint256 hashbuf[2]; - uint256& hash = *alignup<16>(hashbuf); while (true) { unsigned int nHashesDone = 0; - unsigned int nNonceFound; - - // Crypto++ SHA256 - nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1, - (char*)&hash, nHashesDone); - // Check if something found - if (nNonceFound != (unsigned int) -1) + uint256 hash; + while (true) { - for (unsigned int i = 0; i < sizeof(hash)/4; i++) - ((unsigned int*)&hash)[i] = ByteReverse(((unsigned int*)&hash)[i]); - + hash = pblock->GetHash(); if (hash <= hashTarget) { // Found a solution - pblock->nNonce = ByteReverse(nNonceFound); - assert(hash == pblock->GetHash()); - SetThreadPriority(THREAD_PRIORITY_NORMAL); CheckWork(pblock, *pwallet, reservekey); SetThreadPriority(THREAD_PRIORITY_LOWEST); @@ -585,6 +536,10 @@ void static BitcoinMiner(CWallet *pwallet) break; } + pblock->nNonce += 1; + nHashesDone += 1; + if ((pblock->nNonce & 0xFF) == 0) + break; } // Meter hashes/sec @@ -620,7 +575,7 @@ void static BitcoinMiner(CWallet *pwallet) boost::this_thread::interruption_point(); if (vNodes.empty() && Params().NetworkID() != CChainParams::REGTEST) break; - if (nBlockNonce >= 0xffff0000) + if (pblock->nNonce >= 0xffff0000) break; if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60) break; From bb424e4447a5b1e2f9592eed52f869426933f2c8 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 21 Nov 2014 12:22:11 +0100 Subject: [PATCH 03/11] Limit the number of new addressses to accumulate Rebased-From: 12a49cac0a561ada277e93549cae26a3123a6023 --- src/net.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/net.h b/src/net.h index cb07156bdfa65..5c6dc37453216 100644 --- a/src/net.h +++ b/src/net.h @@ -40,6 +40,8 @@ namespace boost { static const unsigned int MAX_INV_SZ = 50000; /** The maximum number of entries in mapAskFor */ static const size_t MAPASKFOR_MAX_SZ = MAX_INV_SZ; +/** The maximum number of new addresses to accumulate before announcing. */ +static const unsigned int MAX_ADDR_TO_SEND = 1000; inline unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); } @@ -400,8 +402,13 @@ class CNode // Known checking here is only to save space from duplicates. // SendMessages will filter it again for knowns that were added // after addresses were pushed. - if (addr.IsValid() && !setAddrKnown.count(addr)) - vAddrToSend.push_back(addr); + if (addr.IsValid() && !setAddrKnown.count(addr)) { + if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) { + vAddrToSend[insecure_rand() % vAddrToSend.size()] = addr; + } else { + vAddrToSend.push_back(addr); + } + } } From 0a94661e8db94e84ecbf1ea45a51fb3c7fb77283 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sat, 6 Dec 2014 07:08:02 -0800 Subject: [PATCH 04/11] Disable SSLv3 (in favor of TLS) for the RPC client and server. TLS is subject to downgrade attacks when SSLv3 is available, and SSLv3 has vulnerabilities. The popular solution is to disable SSLv3. On the web this breaks some tiny number of very old clients. While Bitcoin RPC shouldn't be exposed to the open Internet, it also shouldn't be exposed to really old SSL implementations, so it shouldn't be a major issue for us to disable SSLv3. There is more information on the downgrade attacks and disabling SSLv3 at https://disablessl3.com/ . Rebased-From: 683dc4009b2b01699e672f8150c28e2ebe0aae19 --- src/rpcclient.cpp | 2 +- src/rpcserver.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index 4f3c39ce9bd48..5e62b7130be65 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -40,7 +40,7 @@ Object CallRPC(const string& strMethod, const Array& params) bool fUseSSL = GetBoolArg("-rpcssl", false); asio::io_service io_service; ssl::context context(io_service, ssl::context::sslv23); - context.set_options(ssl::context::no_sslv2); + context.set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3); asio::ssl::stream sslStream(io_service, context); SSLIOStreamDevice d(sslStream, fUseSSL); iostreams::stream< SSLIOStreamDevice > stream(d); diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index f43acf41baa91..cc9e3307de26c 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -539,7 +539,7 @@ void StartRPCThreads() if (fUseSSL) { - rpc_ssl_context->set_options(ssl::context::no_sslv2); + rpc_ssl_context->set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3); filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert")); if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile; From 828b6d38a1d1f8462c2deae6acc7928c735411ef Mon Sep 17 00:00:00 2001 From: vertoe Date: Tue, 9 Dec 2014 23:19:26 +0100 Subject: [PATCH 05/11] Update strings. --- .gitignore | 10 ++++++++++ TODO.md | 22 ++++++++++++++-------- src/base58.h | 2 +- src/bignum.h | 4 ++-- src/chainparams.h | 2 +- src/coins.h | 2 +- src/rpcclient.h | 4 ++-- src/rpcprotocol.h | 4 ++-- src/rpcserver.h | 2 +- src/script.h | 2 +- 10 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 85ddf3871f252..1a8af370bd82a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,11 @@ src/bitcoind src/bitcoin-cli src/test/test_bitcoin src/qt/test/test_bitcoin-qt +src/darkcoin +src/darkcoind +src/darkcoin-cli +src/test/test_darkcoin +src/qt/test/test_darkcoin-qt Makefile.in aclocal.m4 @@ -37,6 +42,7 @@ src/qt/test/moc*.cpp *.o-* *.patch .bitcoin +.darkcoin *.a *.pb.cc *.pb.h @@ -52,11 +58,14 @@ src/qt/test/moc*.cpp *.qm Makefile bitcoin-qt +darkcoin-qt Bitcoin-Qt.app +Darkcoin-Qt.app # Unit-tests Makefile.test bitcoin-qt_test +darkcoin-qt_test # Resources cpp qrc_*.cpp @@ -72,6 +81,7 @@ build *.gcno /*.info test_bitcoin.coverage/ +test_darkcoin.coverage/ total.coverage/ coverage_percent.txt diff --git a/TODO.md b/TODO.md index c4c8d667516fa..aa2546607caa1 100644 --- a/TODO.md +++ b/TODO.md @@ -29,16 +29,22 @@ DONE: MANDATORY: ---------- -- Fix mining protocol to include correct pow and masternodes -- Add masternode payment checks a.k.a. enforcement (based on blockheight) +- Check rpcminer (should be working though) -OPTIONAL: ---------- +BUGS: +----- + +- Daemon and CLI tool can't connect to testnet/regtest instances (wrong port?) +- Daemon and CLI tool can't authenticate via RPC (uh-oh?) +- Qt wallet can't find the config file in testnet mode (wrong path?) + + +ADDITIONAL: +----------- -- Include Evan's public key for msg signing -- Darksend, Instant Transactions, Atomic Transfers, etc. pp. -- Include centralized checkpoint syncing (peercoin style) -- Remove Bitcoin dead weight (SHA256, hardcoded keys, nodes) +- Include trusted public key for message signing +- Masternodes, Enforcement, Darksend, InstantX, Atomic Transfers, ... +- Remove Bitcoin dead weight (SHA256, hardcoded keys, seednodes, ...) - Update strings - Write tests diff --git a/src/base58.h b/src/base58.h index 70681f589a6ab..ae430e51997d0 100644 --- a/src/base58.h +++ b/src/base58.h @@ -92,7 +92,7 @@ class CBase58Data bool operator> (const CBase58Data& b58) const { return CompareTo(b58) > 0; } }; -/** base58-encoded Bitcoin addresses. +/** base58-encoded Darkcoin addresses. * Public-key-hash-addresses have version 0 (or 111 testnet). * The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key. * Script-hash-addresses have version 5 (or 196 testnet). diff --git a/src/bignum.h b/src/bignum.h index 0259338b319d7..9b553491c934a 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -136,7 +136,7 @@ class CBigNum : public BIGNUM if (sn < (int64_t)0) { - // Since the minimum signed integer cannot be represented as positive so long as its type is signed, + // Since the minimum signed integer cannot be represented as positive so long as its type is signed, // and it's not well-defined what happens if you make it unsigned before negating it, // we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate n = -(sn + 1); @@ -284,7 +284,7 @@ class CBigNum : public BIGNUM // and 0xc0de000000 is compact (0x0600c0de) // (0x05c0de00) would be -0x40de000000 // - // Bitcoin only uses this "compact" format for encoding difficulty + // Darkcoin only uses this "compact" format for encoding difficulty // targets, which are unsigned 256bit quantities. Thus, all the // complexities of the sign bit and using base 256 are probably an // implementation accident. diff --git a/src/chainparams.h b/src/chainparams.h index 542afeaf92bd5..0f9e723ac9e48 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -26,7 +26,7 @@ struct CDNSSeedData { /** * CChainParams defines various tweakable parameters of a given instance of the - * Bitcoin system. There are three: the main network on which people trade goods + * Darkcoin system. There are three: the main network on which people trade goods * and services, the public test network which gets reset from time to time and * a regression test mode which is intended for private networks only. It has * minimal difficulty to ensure that blocks can be found instantly. diff --git a/src/coins.h b/src/coins.h index 0ad28524a14d4..99d4b37a6b731 100644 --- a/src/coins.h +++ b/src/coins.h @@ -334,7 +334,7 @@ class CCoinsViewCache : public CCoinsViewBacked // Calculate the size of the cache (in number of transactions) unsigned int GetCacheSize(); - /** Amount of bitcoins coming in to a transaction + /** Amount of darkcoins coming in to a transaction Note that lightweight clients may not know anything besides the hash of previous transactions, so may not be able to calculate this. diff --git a/src/rpcclient.h b/src/rpcclient.h index e101d22ec5691..3af87c7ec6a94 100644 --- a/src/rpcclient.h +++ b/src/rpcclient.h @@ -14,11 +14,11 @@ int CommandLineRPC(int argc, char *argv[]); json_spirit::Array RPCConvertValues(const std::string &strMethod, const std::vector &strParams); -/** Show help message for bitcoin-cli. +/** Show help message for darkcoin-cli. * The mainProgram argument is used to determine whether to show this message as main program * (and include some common options) or as sub-header of another help message. * - * @note the argument can be removed once bitcoin-cli functionality is removed from bitcoind + * @note the argument can be removed once darkcoin-cli functionality is removed from darkcoind */ std::string HelpMessageCli(bool mainProgram); diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h index 8b3df1962142d..52d1eaccf7cab 100644 --- a/src/rpcprotocol.h +++ b/src/rpcprotocol.h @@ -30,7 +30,7 @@ enum HTTPStatusCode HTTP_INTERNAL_SERVER_ERROR = 500, }; -// Bitcoin RPC error codes +// Darkcoin RPC error codes enum RPCErrorCode { // Standard JSON-RPC 2.0 errors @@ -54,7 +54,7 @@ enum RPCErrorCode RPC_TRANSACTION_ALREADY_IN_CHAIN= -27, // Transaction already in chain // P2P client errors - RPC_CLIENT_NOT_CONNECTED = -9, // Bitcoin is not connected + RPC_CLIENT_NOT_CONNECTED = -9, // Darkcoin is not connected RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, // Still downloading initial blocks RPC_CLIENT_NODE_ALREADY_ADDED = -23, // Node is already added RPC_CLIENT_NODE_NOT_ADDED = -24, // Node has not been added before diff --git a/src/rpcserver.h b/src/rpcserver.h index 1092c691beede..d633e17699dd3 100644 --- a/src/rpcserver.h +++ b/src/rpcserver.h @@ -63,7 +63,7 @@ class CRPCCommand }; /** - * Bitcoin RPC command dispatcher. + * Darkcoin RPC command dispatcher. */ class CRPCTable { diff --git a/src/script.h b/src/script.h index 1742ce81f810e..93520310dab48 100644 --- a/src/script.h +++ b/src/script.h @@ -641,7 +641,7 @@ class CScript : public std::vector return nFound; } - // Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs + // Pre-version-0.6, Darkcoin always counted CHECKMULTISIGs // as 20 sigops. With pay-to-script-hash, that changed: // CHECKMULTISIGs serialized in scriptSigs are // counted more accurately, assuming they are of the form From e449d7b4e7818f51cbeb9eb6096f5a5570998686 Mon Sep 17 00:00:00 2001 From: vertoe Date: Tue, 9 Dec 2014 23:38:13 +0100 Subject: [PATCH 06/11] Change binaries to darkcoin*. --- Makefile.am | 18 ++++++------- configure.ac | 16 +++++------ src/Makefile.am | 60 ++++++++++++++++++++--------------------- src/Makefile.include | 10 +++---- src/m4/bitcoin_qt.m4 | 8 +++--- src/qt/Makefile.am | 34 +++++++++++------------ src/qt/test/Makefile.am | 20 +++++++------- src/test/Makefile.am | 20 +++++++------- 8 files changed, 93 insertions(+), 93 deletions(-) diff --git a/Makefile.am b/Makefile.am index 04f8368dd7ab8..fcc240275be71 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,13 +4,13 @@ SUBDIRS = src GZIP_ENV="-9n" -BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT) -BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) -BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT) +BITCOIND_BIN=$(top_builddir)/src/darkcoind$(EXEEXT) +BITCOIN_QT_BIN=$(top_builddir)/src/qt/darkcoin-qt$(EXEEXT) +BITCOIN_CLI_BIN=$(top_builddir)/src/darkcoin-cli$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) -OSX_APP=Bitcoin-Qt.app -OSX_DMG=Bitcoin-Qt.dmg +OSX_APP=Darkcoin-Qt.app +OSX_DMG=Darkcoin-Qt.dmg OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns @@ -72,13 +72,13 @@ $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) $(MKDIR_P) $(@D) $(INSTALL_DATA) $< $@ -$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) +$(OSX_APP)/Contents/MacOS/Darkcoin-Qt: $(BITCOIN_QT_BIN) $(MKDIR_P) $(@D) STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ - $(OSX_APP)/Contents/MacOS/Bitcoin-Qt + $(OSX_APP)/Contents/MacOS/Darkcoin-Qt if BUILD_DARWIN $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) @@ -91,7 +91,7 @@ $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(INSTALL) contrib/macdeploy/background.png dist/.background $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store cd dist; $(LN_S) /Applications Applications - $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist + $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Darkcoin-Qt" -no-pad -r -apple -o $@ dist endif if TARGET_DARWIN @@ -121,7 +121,7 @@ baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtere test_bitcoin.info: baseline_filtered_combined.info $(MAKE) -C src/ check - $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@ + $(LCOV) -c -d $(abs_builddir)/src -t test_darkcoin -o $@ $(LCOV) -z -d $(abs_builddir)/src $(LCOV) -z -d $(abs_builddir)/src/leveldb diff --git a/configure.ac b/configure.ac index e5290cb78feff..092836ef7e3dd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,12 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 9) -define(_CLIENT_VERSION_REVISION, 3) +define(_CLIENT_VERSION_MINOR, 11) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2014) -AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin]) +define(_COPYRIGHT_YEAR, 2015) +AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin]) AC_CONFIG_AUX_DIR([src/build-aux]) AC_CONFIG_MACRO_DIR([src/m4]) AC_CANONICAL_HOST @@ -563,11 +563,11 @@ fi BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path) -AC_MSG_CHECKING([whether to build bitcoind]) +AC_MSG_CHECKING([whether to build darkcoind]) AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes]) AC_MSG_RESULT($build_bitcoind) -AC_MSG_CHECKING([whether to build bitcoin-cli]) +AC_MSG_CHECKING([whether to build darkcoin-cli]) AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes]) AC_MSG_RESULT($build_bitcoin_cli) @@ -660,7 +660,7 @@ if test x$bitcoin_enable_qt != xno; then AC_MSG_WARN("xgettext is required to update qt translations") fi - AC_MSG_CHECKING([whether to build test_bitcoin-qt]) + AC_MSG_CHECKING([whether to build test_darkcoin-qt]) if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then AC_MSG_RESULT([yes]) BUILD_TEST_QT="test" @@ -669,7 +669,7 @@ if test x$bitcoin_enable_qt != xno; then fi fi -AC_MSG_CHECKING([whether to build test_bitcoin]) +AC_MSG_CHECKING([whether to build test_darkcoin]) if test x$use_tests = xyes; then AC_MSG_RESULT([yes]) BUILD_TEST="test" diff --git a/src/Makefile.am b/src/Makefile.am index 6301028e31b1d..fc5d4d73cfe46 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,27 +3,27 @@ include Makefile.include AM_CPPFLAGS += -I$(builddir) noinst_LIBRARIES = \ - libbitcoin_server.a \ - libbitcoin_common.a \ - libbitcoin_cli.a + libdarkcoin_server.a \ + libdarkcoin_common.a \ + libdarkcoin_cli.a if ENABLE_WALLET -noinst_LIBRARIES += libbitcoin_wallet.a +noinst_LIBRARIES += libdarkcoin_wallet.a endif bin_PROGRAMS = if BUILD_BITCOIND - bin_PROGRAMS += bitcoind + bin_PROGRAMS += darkcoind endif if BUILD_BITCOIN_CLI - bin_PROGRAMS += bitcoin-cli + bin_PROGRAMS += darkcoin-cli endif SUBDIRS = . $(BUILD_QT) $(BUILD_TEST) DIST_SUBDIRS = . qt test .PHONY: FORCE -# bitcoin core # +# darkcoin core # BITCOIN_CORE_H = \ addrman.h \ alert.h \ @@ -99,7 +99,7 @@ obj/build.h: FORCE $(abs_top_srcdir) version.o: obj/build.h -libbitcoin_server_a_SOURCES = \ +libdarkcoin_server_a_SOURCES = \ addrman.cpp \ alert.cpp \ bloom.cpp \ @@ -123,7 +123,7 @@ libbitcoin_server_a_SOURCES = \ $(JSON_H) \ $(BITCOIN_CORE_H) -libbitcoin_wallet_a_SOURCES = \ +libdarkcoin_wallet_a_SOURCES = \ db.cpp \ crypter.cpp \ rpcdump.cpp \ @@ -132,7 +132,7 @@ libbitcoin_wallet_a_SOURCES = \ walletdb.cpp \ $(BITCOIN_CORE_H) -libbitcoin_common_a_SOURCES = \ +libdarkcoin_common_a_SOURCES = \ base58.cpp \ allocators.cpp \ chainparams.cpp \ @@ -161,47 +161,47 @@ libbitcoin_common_a_SOURCES = \ $(BITCOIN_CORE_H) if GLIBC_BACK_COMPAT -libbitcoin_common_a_SOURCES += compat/glibc_compat.cpp -libbitcoin_common_a_SOURCES += compat/glibcxx_compat.cpp +libdarkcoin_common_a_SOURCES += compat/glibc_compat.cpp +libdarkcoin_common_a_SOURCES += compat/glibcxx_compat.cpp endif -libbitcoin_cli_a_SOURCES = \ +libdarkcoin_cli_a_SOURCES = \ rpcclient.cpp \ $(BITCOIN_CORE_H) -nodist_libbitcoin_common_a_SOURCES = $(top_srcdir)/src/obj/build.h +nodist_libdarkcoin_common_a_SOURCES = $(top_srcdir)/src/obj/build.h # -# bitcoind binary # -bitcoind_LDADD = \ - libbitcoin_server.a \ - libbitcoin_cli.a \ - libbitcoin_common.a \ +# darkcoind binary # +darkcoind_LDADD = \ + libdarkcoin_server.a \ + libdarkcoin_cli.a \ + libdarkcoin_common.a \ $(LIBLEVELDB) \ $(LIBMEMENV) if ENABLE_WALLET -bitcoind_LDADD += libbitcoin_wallet.a +darkcoind_LDADD += libdarkcoin_wallet.a endif -bitcoind_SOURCES = bitcoind.cpp +darkcoind_SOURCES = bitcoind.cpp # if TARGET_WINDOWS -bitcoind_SOURCES += bitcoind-res.rc +darkcoind_SOURCES += bitcoind-res.rc endif AM_CPPFLAGS += $(BDB_CPPFLAGS) -bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) +darkcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) -# bitcoin-cli binary # -bitcoin_cli_LDADD = \ - libbitcoin_cli.a \ - libbitcoin_common.a \ +# darkcoin-cli binary # +darkcoin_cli_LDADD = \ + libdarkcoin_cli.a \ + libdarkcoin_common.a \ $(BOOST_LIBS) -bitcoin_cli_SOURCES = bitcoin-cli.cpp +darkcoin_cli_SOURCES = bitcoin-cli.cpp # if TARGET_WINDOWS -bitcoin_cli_SOURCES += bitcoin-cli-res.rc +darkcoin_cli_SOURCES += bitcoin-cli-res.rc endif # NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race @@ -212,7 +212,7 @@ leveldb/%.a: CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \ OPT="$(CXXFLAGS) $(CPPFLAGS)" -qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES) +qt/bitcoinstrings.cpp: $(libdarkcoin_server_a_SOURCES) $(libdarkcoin_common_a_SOURCES) $(libdarkcoin_cli_a_SOURCES) @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" @cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py diff --git a/src/Makefile.include b/src/Makefile.include index 2fc6cd7775153..499c69dfbe966 100644 --- a/src/Makefile.include +++ b/src/Makefile.include @@ -12,11 +12,11 @@ AM_CPPFLAGS = $(INCLUDES) \ AM_CPPFLAGS += $(LEVELDB_CPPFLAGS) AM_LDFLAGS = $(PTHREAD_CFLAGS) -LIBBITCOIN_SERVER=$(top_builddir)/src/libbitcoin_server.a -LIBBITCOIN_WALLET=$(top_builddir)/src/libbitcoin_wallet.a -LIBBITCOIN_COMMON=$(top_builddir)/src/libbitcoin_common.a -LIBBITCOIN_CLI=$(top_builddir)/src/libbitcoin_cli.a -LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a +LIBBITCOIN_SERVER=$(top_builddir)/src/libdarkcoin_server.a +LIBBITCOIN_WALLET=$(top_builddir)/src/libdarkcoin_wallet.a +LIBBITCOIN_COMMON=$(top_builddir)/src/libdarkcoin_common.a +LIBBITCOIN_CLI=$(top_builddir)/src/libdarkcoin_cli.a +LIBBITCOINQT=$(top_builddir)/src/qt/libdarkcoinqt.a $(LIBBITCOIN): $(MAKE) -C $(top_builddir)/src $(@F) diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4 index 20fead2c1ec8f..d5dc33193093e 100644 --- a/src/m4/bitcoin_qt.m4 +++ b/src/m4/bitcoin_qt.m4 @@ -3,7 +3,7 @@ dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. AC_DEFUN([BITCOIN_QT_FAIL],[ if test "x$bitcoin_qt_want_version" = "xauto" && test x$bitcoin_qt_force != xyes; then if test x$bitcoin_enable_qt != xno; then - AC_MSG_WARN([$1; bitcoin-qt frontend will not be built]) + AC_MSG_WARN([$1; darkcoin-qt frontend will not be built]) fi bitcoin_enable_qt=no else @@ -123,7 +123,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ dnl enable qt support - AC_MSG_CHECKING(whether to build Bitcoin Core GUI) + AC_MSG_CHECKING(whether to build Darkcoin Core GUI) BITCOIN_QT_CHECK([ bitcoin_enable_qt=yes bitcoin_enable_qt_test=yes @@ -343,14 +343,14 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ dnl check a header to find out. When Qt is built statically, some plugins must dnl be linked into the final binary as well. These plugins have changed between dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration - dnl plugin was added. Since we can't tell if Qt4 is static or not, it is + dnl plugin was added. Since we can't tell if Qt4 is static or not, it is dnl assumed for all non-pkg-config builds. dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the dnl results to QT_LIBS. BITCOIN_QT_CHECK([ if test x$bitcoin_qt_got_major_vers == x5; then _BITCOIN_QT_IS_STATIC - if test x$bitcoin_cv_static_qt == xyes; then + if test x$bitcoin_cv_static_qt == xyes; then AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) if test x$TARGET_OS == xwindows; then diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am index 648971bd8fa42..7d4966c497a84 100644 --- a/src/qt/Makefile.am +++ b/src/qt/Makefile.am @@ -5,12 +5,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/src \ -I$(top_builddir)/src/qt/forms \ $(PROTOBUF_CFLAGS) \ $(QR_CFLAGS) -bin_PROGRAMS = bitcoin-qt -noinst_LIBRARIES = libbitcoinqt.a +bin_PROGRAMS = darkcoin-qt +noinst_LIBRARIES = libdarkcoinqt.a SUBDIRS = . $(BUILD_TEST_QT) DIST_SUBDIRS = . test -# bitcoin qt core # +# darkcoin qt core # QT_TS = \ locale/bitcoin_ach.ts \ locale/bitcoin_af_ZA.ts \ @@ -321,38 +321,38 @@ RES_MOVIES = $(wildcard res/movies/spinner-*.png) BITCOIN_RC = res/bitcoin-qt-res.rc -libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ +libdarkcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES) -libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \ +libdarkcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \ $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) -nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \ +nodist_libdarkcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \ $(PROTOBUF_H) $(QT_QRC_CPP) -BUILT_SOURCES = $(nodist_libbitcoinqt_a_SOURCES) +BUILT_SOURCES = $(nodist_libdarkcoinqt_a_SOURCES) #Generating these with a half-written protobuf header leads to wacky results. #This makes sure it's done. $(QT_MOC): $(PROTOBUF_H) $(QT_MOC_CPP): $(PROTOBUF_H) -# bitcoin-qt binary # -bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ +# darkcoin-qt binary # +darkcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ -I$(top_srcdir)/src/qt/forms -bitcoin_qt_SOURCES = bitcoin.cpp +darkcoin_qt_SOURCES = bitcoin.cpp if TARGET_DARWIN - bitcoin_qt_SOURCES += $(BITCOIN_MM) + darkcoin_qt_SOURCES += $(BITCOIN_MM) endif if TARGET_WINDOWS - bitcoin_qt_SOURCES += $(BITCOIN_RC) + darkcoin_qt_SOURCES += $(BITCOIN_RC) endif -bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN_SERVER) +darkcoin_qt_LDADD = libdarkcoinqt.a $(LIBBITCOIN_SERVER) if ENABLE_WALLET -bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET) +darkcoin_qt_LDADD += $(LIBBITCOIN_WALLET) endif -bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ +darkcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) -bitcoin_qt_LDFLAGS = $(QT_LDFLAGS) +darkcoin_qt_LDFLAGS = $(QT_LDFLAGS) # forms/foo.h -> forms/ui_foo.h QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h)))) @@ -371,7 +371,7 @@ translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $( @QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts $(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H) - @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \ + @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name darkcoin -o $(abs_builddir)/$@ $< || \ echo error: could not build $@ $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,} $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,} diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am index 2461b5ff4d4d5..6e7a6321fe6f8 100644 --- a/src/qt/test/Makefile.am +++ b/src/qt/test/Makefile.am @@ -5,8 +5,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/src \ -I$(top_builddir)/src/qt \ $(PROTOBUF_CFLAGS) \ $(QR_CFLAGS) -bin_PROGRAMS = test_bitcoin-qt -TESTS = test_bitcoin-qt +bin_PROGRAMS = test_darkcoin-qt +TESTS = test_darkcoin-qt TEST_QT_MOC_CPP = moc_uritests.cpp @@ -21,26 +21,26 @@ TEST_QT_H = \ BUILT_SOURCES = $(TEST_QT_MOC_CPP) -test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) +test_darkcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) -test_bitcoin_qt_SOURCES = \ +test_darkcoin_qt_SOURCES = \ test_main.cpp \ uritests.cpp \ $(TEST_QT_H) if ENABLE_WALLET -test_bitcoin_qt_SOURCES += \ +test_darkcoin_qt_SOURCES += \ paymentservertests.cpp endif -nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) +nodist_test_darkcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) -test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) +test_darkcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) if ENABLE_WALLET -test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET) +test_darkcoin_qt_LDADD += $(LIBBITCOIN_WALLET) endif -test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \ +test_darkcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \ $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \ $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) -test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS) +test_darkcoin_qt_LDFLAGS = $(QT_LDFLAGS) CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno diff --git a/src/test/Makefile.am b/src/test/Makefile.am index e12f4904f14cc..d3a11f1f0a681 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -2,9 +2,9 @@ include $(top_srcdir)/src/Makefile.include AM_CPPFLAGS += -I$(top_srcdir)/src -bin_PROGRAMS = test_bitcoin +bin_PROGRAMS = test_darkcoin -TESTS = test_bitcoin +TESTS = test_darkcoin JSON_TEST_FILES = \ data/script_valid.json \ @@ -22,16 +22,16 @@ RAW_TEST_FILES = data/alertTests.raw BUILT_SOURCES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) -# test_bitcoin binary # -test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS) -test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ +# test_darkcoin binary # +test_darkcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS) +test_darkcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) if ENABLE_WALLET -test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) +test_darkcoin_LDADD += $(LIBBITCOIN_WALLET) endif -test_bitcoin_LDADD += $(BDB_LIBS) +test_darkcoin_LDADD += $(BDB_LIBS) -test_bitcoin_SOURCES = \ +test_darkcoin_SOURCES = \ alert_tests.cpp \ allocator_tests.cpp \ base32_tests.cpp \ @@ -66,12 +66,12 @@ test_bitcoin_SOURCES = \ $(JSON_TEST_FILES) $(RAW_TEST_FILES) if ENABLE_WALLET -test_bitcoin_SOURCES += \ +test_darkcoin_SOURCES += \ accounting_tests.cpp \ wallet_tests.cpp \ rpc_wallet_tests.cpp endif -nodist_test_bitcoin_SOURCES = $(BUILT_SOURCES) +nodist_test_darkcoin_SOURCES = $(BUILT_SOURCES) CLEANFILES = *.gcda *.gcno $(BUILT_SOURCES) From 8fbde6cfeb5e8f40487bc2396caf4f1c25b506f1 Mon Sep 17 00:00:00 2001 From: vertoe Date: Wed, 10 Dec 2014 00:22:01 +0100 Subject: [PATCH 07/11] Update rpc strings. --- src/bitcoind.cpp | 24 +++++----- src/rpcserver.cpp | 12 ++--- src/rpcwallet.cpp | 117 +++++++++++++++++++++++----------------------- 3 files changed, 77 insertions(+), 76 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index c968f9627e114..0932362e0f02c 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -21,8 +21,8 @@ * * \section intro_sec Introduction * - * This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (http://www.bitcoin.org/), - * which enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate + * This is the developer documentation of the reference client for an experimental new digital currency called Darkcoin (http://www.darkcoin.io/), + * which enables instant payments to anyone, anywhere in the world. Darkcoin uses peer-to-peer technology to operate * with no central authority: managing transactions and issuing money are carried out collectively by the network. * * The software is a community-driven open source project, released under the MIT license. @@ -86,14 +86,14 @@ bool AppInit(int argc, char* argv[]) if (mapArgs.count("-?") || mapArgs.count("--help")) { - // First part of help message is specific to bitcoind / RPC client - std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" + + // First part of help message is specific to darkcoind / RPC client + std::string strUsage = _("Darkcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" + _("Usage:") + "\n" + - " bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" + - _("Usage (deprecated, use bitcoin-cli):") + "\n" + - " bitcoind [options] [params] " + _("Send command to Bitcoin Core") + "\n" + - " bitcoind [options] help " + _("List commands") + "\n" + - " bitcoind [options] help " + _("Get help for a command") + "\n"; + " darkcoind [options] " + _("Start Darkcoin Core Daemon") + "\n" + + _("Usage (deprecated, use darkcoin-cli):") + "\n" + + " darkcoind [options] [params] " + _("Send command to Darkcoin Core") + "\n" + + " darkcoind [options] help " + _("List commands") + "\n" + + " darkcoind [options] help " + _("Get help for a command") + "\n"; strUsage += "\n" + HelpMessage(HMM_BITCOIND); strUsage += "\n" + HelpMessageCli(false); @@ -105,7 +105,7 @@ bool AppInit(int argc, char* argv[]) // Command-line RPC bool fCommandLine = false; for (int i = 1; i < argc; i++) - if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitcoin:")) + if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "darkcoin:")) fCommandLine = true; if (fCommandLine) @@ -117,7 +117,7 @@ bool AppInit(int argc, char* argv[]) fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { - fprintf(stdout, "Bitcoin server starting\n"); + fprintf(stdout, "Darkcoin server starting\n"); // Daemonize pid_t pid = fork(); @@ -177,7 +177,7 @@ int main(int argc, char* argv[]) bool fRet = false; - // Connect bitcoind signal handlers + // Connect darkcoind signal handlers noui_connect(); fRet = AppInit(argc, argv); diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 44888a753e09b..9cddd8846f0df 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -208,10 +208,10 @@ Value stop(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "stop\n" - "\nStop Bitcoin server."); + "\nStop Darkcoin server."); // Shutdown will take long enough that the response should get back StartShutdown(); - return "Bitcoin server stopping"; + return "Darkcoin server stopping"; } @@ -508,7 +508,7 @@ void StartRPCThreads() { unsigned char rand_pwd[32]; RAND_bytes(rand_pwd, 32); - string strWhatAmI = "To use bitcoind"; + string strWhatAmI = "To use darkcoind"; if (mapArgs.count("-server")) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) @@ -517,13 +517,13 @@ void StartRPCThreads() _("%s, you must set a rpcpassword in the configuration file:\n" "%s\n" "It is recommended you use the following random password:\n" - "rpcuser=bitcoinrpc\n" + "rpcuser=darkcoinrpc\n" "rpcpassword=%s\n" "(you do not need to remember this password)\n" "The username and password MUST NOT be the same.\n" "If the file does not exist, create it with owner-readable-only file permissions.\n" "It is also recommended to set alertnotify so you are notified of problems;\n" - "for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"), + "for example: alertnotify=echo %%s | mail -s \"Darkcoin Alert\" admin@foo.com\n"), strWhatAmI, GetConfigFile().string(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)), @@ -889,7 +889,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s } std::string HelpExampleCli(string methodname, string args){ - return "> bitcoin-cli " + methodname + " " + args + "\n"; + return "> darkcoin-cli " + methodname + " " + args + "\n"; } std::string HelpExampleRpc(string methodname, string args){ diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index e3b35dbb044ce..1f75bf6bb7e88 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers +// Copyright (c) 2014 vertoe & the Darkcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -76,13 +77,13 @@ Value getnewaddress(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "getnewaddress ( \"account\" )\n" - "\nReturns a new Bitcoin address for receiving payments.\n" + "\nReturns a new Darkcoin address for receiving payments.\n" "If 'account' is specified (recommended), it is added to the address book \n" "so payments received with the address will be credited to 'account'.\n" "\nArguments:\n" "1. \"account\" (string, optional) The account name for the address to be linked to. if not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n" "\nResult:\n" - "\"bitcoinaddress\" (string) The new bitcoin address\n" + "\"darkcoinaddress\" (string) The new darkcoin address\n" "\nExamples:\n" + HelpExampleCli("getnewaddress", "") + HelpExampleCli("getnewaddress", "\"\"") @@ -153,11 +154,11 @@ Value getaccountaddress(const Array& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( "getaccountaddress \"account\"\n" - "\nReturns the current Bitcoin address for receiving payments to this account.\n" + "\nReturns the current Darkcoin address for receiving payments to this account.\n" "\nArguments:\n" "1. \"account\" (string, required) The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.\n" "\nResult:\n" - "\"bitcoinaddress\" (string) The account bitcoin address\n" + "\"darkcoinaddress\" (string) The account darkcoin address\n" "\nExamples:\n" + HelpExampleCli("getaccountaddress", "") + HelpExampleCli("getaccountaddress", "\"\"") @@ -181,7 +182,7 @@ Value getrawchangeaddress(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "getrawchangeaddress\n" - "\nReturns a new Bitcoin address, for receiving change.\n" + "\nReturns a new Darkcoin address, for receiving change.\n" "This is for use with raw transactions, NOT normal use.\n" "\nResult:\n" "\"address\" (string) The address\n" @@ -210,19 +211,19 @@ Value setaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "setaccount \"bitcoinaddress\" \"account\"\n" + "setaccount \"darkcoinaddress\" \"account\"\n" "\nSets the account associated with the given address.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n" + "1. \"darkcoinaddress\" (string, required) The darkcoin address to be associated with an account.\n" "2. \"account\" (string, required) The account to assign the address to.\n" "\nExamples:\n" - + HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"") - + HelpExampleRpc("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"") + + HelpExampleCli("setaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"tabby\"") + + HelpExampleRpc("setaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"tabby\"") ); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address"); string strAccount; @@ -247,20 +248,20 @@ Value getaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( - "getaccount \"bitcoinaddress\"\n" + "getaccount \"darkcoinaddress\"\n" "\nReturns the account associated with the given address.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n" + "1. \"darkcoinaddress\" (string, required) The darkcoin address for account lookup.\n" "\nResult:\n" "\"accountname\" (string) the account address\n" "\nExamples:\n" - + HelpExampleCli("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") - + HelpExampleRpc("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + + HelpExampleCli("getaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"") + + HelpExampleRpc("getaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"") ); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address"); string strAccount; map::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); @@ -280,7 +281,7 @@ Value getaddressesbyaccount(const Array& params, bool fHelp) "1. \"account\" (string, required) The account name.\n" "\nResult:\n" "[ (json array of string)\n" - " \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n" + " \"darkcoinaddress\" (string) a darkcoin address associated with the given account\n" " ,...\n" "]\n" "\nExamples:\n" @@ -306,11 +307,11 @@ Value sendtoaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( - "sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" )\n" + "sendtoaddress \"darkcoinaddress\" amount ( \"comment\" \"comment-to\" )\n" "\nSent an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n" + HelpRequiringPassphrase() + "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n" + "1. \"darkcoinaddress\" (string, required) The darkcoin address to send to.\n" "2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n" "3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n" " This is not part of the transaction, just kept in your wallet.\n" @@ -327,7 +328,7 @@ Value sendtoaddress(const Array& params, bool fHelp) CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address"); // Amount int64_t nAmount = AmountFromValue(params[1]); @@ -360,7 +361,7 @@ Value listaddressgroupings(const Array& params, bool fHelp) "[\n" " [\n" " [\n" - " \"bitcoinaddress\", (string) The bitcoin address\n" + " \"darkcoinaddress\", (string) The darkcoin address\n" " amount, (numeric) The amount in btc\n" " \"account\" (string, optional) The account\n" " ]\n" @@ -399,11 +400,11 @@ Value signmessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error( - "signmessage \"bitcoinaddress\" \"message\"\n" + "signmessage \"darkcoinaddress\" \"message\"\n" "\nSign a message with the private key of an address" + HelpRequiringPassphrase() + "\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n" + "1. \"darkcoinaddress\" (string, required) The darkcoin address to use for the private key.\n" "2. \"message\" (string, required) The message to create a signature of.\n" "\nResult:\n" "\"signature\" (string) The signature of the message encoded in base 64\n" @@ -411,11 +412,11 @@ Value signmessage(const Array& params, bool fHelp) "\nUnlock the wallet for 30 seconds\n" + HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + "\nCreate the signature\n" - + HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") + + + HelpExampleCli("signmessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"my message\"") + "\nVerify the signature\n" - + HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") + + + HelpExampleCli("verifymessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"signature\" \"my message\"") + "\nAs json rpc\n" - + HelpExampleRpc("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"") + + HelpExampleRpc("signmessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"my message\"") ); EnsureWalletIsUnlocked(); @@ -450,29 +451,29 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n" - "\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n" + "getreceivedbyaddress \"darkcoinaddress\" ( minconf )\n" + "\nReturns the total amount received by the given darkcoinaddress in transactions with at least minconf confirmations.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n" + "1. \"darkcoinaddress\" (string, required) The darkcoin address for transactions.\n" "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" "\nResult:\n" "amount (numeric) The total amount in btc received at this address.\n" "\nExamples:\n" "\nThe amount from transactions with at least 1 confirmation\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"") + "\nThe amount including unconfirmed transactions, zero confirmations\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0") + + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0") + "\nThe amount with at least 6 confirmation, very safe\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6") + + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 6") + "\nAs a json rpc call\n" - + HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6") + + HelpExampleRpc("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 6") ); - // Bitcoin address + // Darkcoin address CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); CScript scriptPubKey; if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address"); scriptPubKey.SetDestination(address.Get()); if (!IsMine(*pwalletMain,scriptPubKey)) return (double)0.0; @@ -732,13 +733,13 @@ Value sendfrom(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 6) throw runtime_error( - "sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n" - "\nSent an amount from an account to a bitcoin address.\n" + "sendfrom \"fromaccount\" \"todarkcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n" + "\nSent an amount from an account to a darkcoin address.\n" "The amount is a real and is rounded to the nearest 0.00000001." + HelpRequiringPassphrase() + "\n" "\nArguments:\n" "1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n" - "2. \"tobitcoinaddress\" (string, required) The bitcoin address to send funds to.\n" + "2. \"todarkcoinaddress\" (string, required) The darkcoin address to send funds to.\n" "3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n" "4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n" "5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n" @@ -760,7 +761,7 @@ Value sendfrom(const Array& params, bool fHelp) string strAccount = AccountFromValue(params[0]); CBitcoinAddress address(params[1].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address"); int64_t nAmount = AmountFromValue(params[2]); int nMinDepth = 1; if (params.size() > 3) @@ -800,7 +801,7 @@ Value sendmany(const Array& params, bool fHelp) "1. \"fromaccount\" (string, required) The account to send the funds from, can be \"\" for the default account\n" "2. \"amounts\" (string, required) A json object with addresses and amounts\n" " {\n" - " \"address\":amount (numeric) The bitcoin address is the key, the numeric amount in btc is the value\n" + " \"address\":amount (numeric) The darkcoin address is the key, the numeric amount in btc is the value\n" " ,...\n" " }\n" "3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n" @@ -810,11 +811,11 @@ Value sendmany(const Array& params, bool fHelp) " the number of addresses.\n" "\nExamples:\n" "\nSend two amounts to two different addresses:\n" - + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") + + + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") + "\nSend two amounts to two different addresses setting the confirmation and comment:\n" - + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") + + + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") + "\nAs a json rpc call\n" - + HelpExampleRpc("sendmany", "\"tabby\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"") + + HelpExampleRpc("sendmany", "\"tabby\", \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"") ); string strAccount = AccountFromValue(params[0]); @@ -836,7 +837,7 @@ Value sendmany(const Array& params, bool fHelp) { CBitcoinAddress address(s.name_); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+s.name_); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Darkcoin address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); @@ -879,26 +880,26 @@ Value addmultisigaddress(const Array& params, bool fHelp) { string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n" "\nAdd a nrequired-to-sign multisignature address to the wallet.\n" - "Each key is a Bitcoin address or hex-encoded public key.\n" + "Each key is a Darkcoin address or hex-encoded public key.\n" "If 'account' is specified, assign address to that account.\n" "\nArguments:\n" "1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n" - "2. \"keysobject\" (string, required) A json array of bitcoin addresses or hex-encoded public keys\n" + "2. \"keysobject\" (string, required) A json array of darkcoin addresses or hex-encoded public keys\n" " [\n" - " \"address\" (string) bitcoin address or hex-encoded public key\n" + " \"address\" (string) darkcoin address or hex-encoded public key\n" " ...,\n" " ]\n" "3. \"account\" (string, optional) An account to assign the addresses to.\n" "\nResult:\n" - "\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n" + "\"darkcoinaddress\" (string) A darkcoin address associated with the keys.\n" "\nExamples:\n" "\nAdd a multisig address from 2 addresses\n" - + HelpExampleCli("addmultisigaddress", "2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") + + + HelpExampleCli("addmultisigaddress", "2 \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"") + "\nAs json rpc call\n" - + HelpExampleRpc("addmultisigaddress", "2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") + + HelpExampleRpc("addmultisigaddress", "2, \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"") ; throw runtime_error(msg); } @@ -1192,7 +1193,7 @@ Value listtransactions(const Array& params, bool fHelp) " {\n" " \"account\":\"accountname\", (string) The account name associated with the transaction. \n" " It will be \"\" for the default account.\n" - " \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n" + " \"address\":\"darkcoinaddress\", (string) The darkcoin address of the transaction. Not present for \n" " move transactions (category = move).\n" " \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n" " transaction between accounts, and not associated with an address,\n" @@ -1365,7 +1366,7 @@ Value listsinceblock(const Array& params, bool fHelp) "{\n" " \"transactions\": [\n" " \"account\":\"accountname\", (string) The account name associated with the transaction. Will be \"\" for the default account.\n" - " \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n" + " \"address\":\"darkcoinaddress\", (string) The darkcoin address of the transaction. Not present for move transactions (category = move).\n" " \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n" " \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n" " outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n" @@ -1452,7 +1453,7 @@ Value gettransaction(const Array& params, bool fHelp) " \"details\" : [\n" " {\n" " \"account\" : \"accountname\", (string) The account name involved in the transaction, can be \"\" for the default account.\n" - " \"address\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n" + " \"address\" : \"darkcoinaddress\", (string) The darkcoin address involved in the transaction\n" " \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n" " \"amount\" : x.xxx (numeric) The amount in btc\n" " }\n" @@ -1564,7 +1565,7 @@ Value walletpassphrase(const Array& params, bool fHelp) throw runtime_error( "walletpassphrase \"passphrase\" timeout\n" "\nStores the wallet decryption key in memory for 'timeout' seconds.\n" - "This is needed prior to performing transactions related to private keys such as sending bitcoins\n" + "This is needed prior to performing transactions related to private keys such as sending darkcoins\n" "\nArguments:\n" "1. \"passphrase\" (string, required) The wallet passphrase\n" "2. timeout (numeric, required) The time to keep the decryption key in seconds.\n" @@ -1704,10 +1705,10 @@ Value encryptwallet(const Array& params, bool fHelp) "\nExamples:\n" "\nEncrypt you wallet\n" + HelpExampleCli("encryptwallet", "\"my pass phrase\"") + - "\nNow set the passphrase to use the wallet, such as for signing or sending bitcoin\n" + "\nNow set the passphrase to use the wallet, such as for signing or sending darkcoin\n" + HelpExampleCli("walletpassphrase", "\"my pass phrase\"") + "\nNow we can so something like sign\n" - + HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") + + + HelpExampleCli("signmessage", "\"darkcoinaddress\" \"test message\"") + "\nNow lock the wallet again by removing the passphrase\n" + HelpExampleCli("walletlock", "") + "\nAs a json rpc call\n" @@ -1737,7 +1738,7 @@ Value encryptwallet(const Array& params, bool fHelp) // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); - return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; + return "wallet encrypted; darkcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; } Value lockunspent(const Array& params, bool fHelp) @@ -1747,7 +1748,7 @@ Value lockunspent(const Array& params, bool fHelp) "lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n" "\nUpdates list of temporarily unspendable outputs.\n" "Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n" - "A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.\n" + "A locked transaction output will not be chosen by automatic coin selection, when spending darkcoins.\n" "Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n" "is always cleared (by virtue of process exit) when a node stops or fails.\n" "Also see the listunspent call\n" @@ -1896,7 +1897,7 @@ Value getwalletinfo(const Array& params, bool fHelp) "\nResult:\n" "{\n" " \"walletversion\": xxxxx, (numeric) the wallet version\n" - " \"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n" + " \"balance\": xxxxxxx, (numeric) the total darkcoin balance of the wallet\n" " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" From 66623009007062e77db943d999e1ddb32da99a96 Mon Sep 17 00:00:00 2001 From: vertoe Date: Wed, 10 Dec 2014 00:35:43 +0100 Subject: [PATCH 08/11] Change sources to darkcoin*. --- src/Makefile.am | 4 ++-- src/{bitcoin-cli.cpp => darkcoin-cli.cpp} | 0 src/{bitcoind.cpp => darkcoind.cpp} | 0 src/qt/Makefile.am | 4 ++-- src/qt/{bitcoin.cpp => darkcoin.cpp} | 0 src/test/Makefile.am | 2 +- src/test/{test_bitcoin.cpp => test_darkcoin.cpp} | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename src/{bitcoin-cli.cpp => darkcoin-cli.cpp} (100%) rename src/{bitcoind.cpp => darkcoind.cpp} (100%) rename src/qt/{bitcoin.cpp => darkcoin.cpp} (100%) rename src/test/{test_bitcoin.cpp => test_darkcoin.cpp} (100%) diff --git a/src/Makefile.am b/src/Makefile.am index fc5d4d73cfe46..fcb9229a81b60 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -182,7 +182,7 @@ darkcoind_LDADD = \ if ENABLE_WALLET darkcoind_LDADD += libdarkcoin_wallet.a endif -darkcoind_SOURCES = bitcoind.cpp +darkcoind_SOURCES = darkcoind.cpp # if TARGET_WINDOWS @@ -197,7 +197,7 @@ darkcoin_cli_LDADD = \ libdarkcoin_cli.a \ libdarkcoin_common.a \ $(BOOST_LIBS) -darkcoin_cli_SOURCES = bitcoin-cli.cpp +darkcoin_cli_SOURCES = darkcoin-cli.cpp # if TARGET_WINDOWS diff --git a/src/bitcoin-cli.cpp b/src/darkcoin-cli.cpp similarity index 100% rename from src/bitcoin-cli.cpp rename to src/darkcoin-cli.cpp diff --git a/src/bitcoind.cpp b/src/darkcoind.cpp similarity index 100% rename from src/bitcoind.cpp rename to src/darkcoind.cpp diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am index 7d4966c497a84..24d7ef7071b3a 100644 --- a/src/qt/Makefile.am +++ b/src/qt/Makefile.am @@ -261,7 +261,7 @@ RES_ICONS = \ res/icons/tx_mined.png BITCOIN_QT_CPP = \ - bitcoin.cpp \ + darkcoin.cpp \ bitcoinaddressvalidator.cpp \ bitcoinamountfield.cpp \ bitcoingui.cpp \ @@ -339,7 +339,7 @@ $(QT_MOC_CPP): $(PROTOBUF_H) # darkcoin-qt binary # darkcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ -I$(top_srcdir)/src/qt/forms -darkcoin_qt_SOURCES = bitcoin.cpp +darkcoin_qt_SOURCES = darkcoin.cpp if TARGET_DARWIN darkcoin_qt_SOURCES += $(BITCOIN_MM) endif diff --git a/src/qt/bitcoin.cpp b/src/qt/darkcoin.cpp similarity index 100% rename from src/qt/bitcoin.cpp rename to src/qt/darkcoin.cpp diff --git a/src/test/Makefile.am b/src/test/Makefile.am index d3a11f1f0a681..39ef47a31e1ff 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -57,7 +57,7 @@ test_darkcoin_SOURCES = \ script_tests.cpp \ serialize_tests.cpp \ sigopcount_tests.cpp \ - test_bitcoin.cpp \ + test_darkcoin.cpp \ transaction_tests.cpp \ uint256_tests.cpp \ util_tests.cpp \ diff --git a/src/test/test_bitcoin.cpp b/src/test/test_darkcoin.cpp similarity index 100% rename from src/test/test_bitcoin.cpp rename to src/test/test_darkcoin.cpp From 91795c25b1fa334fe81e5459d597da51a7838de0 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 11 Dec 2014 14:07:03 +0100 Subject: [PATCH 09/11] fix broken build (UdjinM6) --- src/darkcoind.cpp | 2 +- src/qt/Makefile.am | 2 +- src/qt/darkcoin.cpp | 2 +- src/qt/locale/bitcoin_en.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/darkcoind.cpp b/src/darkcoind.cpp index 0932362e0f02c..84619f5509279 100644 --- a/src/darkcoind.cpp +++ b/src/darkcoind.cpp @@ -64,7 +64,7 @@ bool AppInit(int argc, char* argv[]) // // Parameters // - // If Qt is used, parameters/darkcoin.conf are parsed in qt/bitcoin.cpp's main() + // If Qt is used, parameters/darkcoin.conf are parsed in qt/darkcoin.cpp's main() ParseParameters(argc, argv); if (!boost::filesystem::is_directory(GetDataDir(false))) { diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am index 24d7ef7071b3a..de9eea0eb47ce 100644 --- a/src/qt/Makefile.am +++ b/src/qt/Makefile.am @@ -153,7 +153,7 @@ BITCOIN_MM = \ macnotificationhandler.mm QT_MOC = \ - bitcoin.moc \ + darkcoin.moc \ intro.moc \ overviewpage.moc \ rpcconsole.moc diff --git a/src/qt/darkcoin.cpp b/src/qt/darkcoin.cpp index d179dd565afa8..d7f2881fff1c4 100644 --- a/src/qt/darkcoin.cpp +++ b/src/qt/darkcoin.cpp @@ -221,7 +221,7 @@ public slots: void startThread(); }; -#include "bitcoin.moc" +#include "darkcoin.moc" BitcoinCore::BitcoinCore(): QObject() diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index dca26cf4dada1..47c9f39f3a22c 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -724,7 +724,7 @@ Address: %4 Wallet is <b>encrypted</b> and currently <b>locked</b> - + A fatal error occurred. Bitcoin can no longer continue safely and will quit. A fatal error occurred. Bitcoin can no longer continue safely and will quit. @@ -1706,7 +1706,7 @@ Address: %4 QObject - + Bitcoin From 80c46368402ae15eb388e1fa6f22aaa55930ae2e Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 11 Dec 2014 14:20:10 +0100 Subject: [PATCH 10/11] fix test_bitcoin -> test_darkcoin --- Makefile.am | 24 ++++++++++++------------ contrib/debian/rules | 4 ++-- contrib/devtools/README.md | 8 ++++---- doc/unit-tests.md | 2 +- qa/pull-tester/build-tests.sh.in | 4 ++-- src/test/README.md | 4 ++-- src/test/test_darkcoin.cpp | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index fcc240275be71..d75dada2fc6f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,9 +29,9 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ $(top_srcdir)/contrib/macdeploy/DS_Store COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ - leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ + leveldb_baseline.info test_darkcoin_filtered.info total_coverage.info \ baseline_filtered.info block_test_filtered.info \ - leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info + leveldb_baseline_filtered.info test_darkcoin_coverage.info test_darkcoin.info dist-hook: -$(MAKE) -C $(top_distdir)/src/leveldb clean @@ -119,16 +119,16 @@ leveldb_baseline_filtered.info: leveldb_baseline.info baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ -test_bitcoin.info: baseline_filtered_combined.info +test_darkcoin.info: baseline_filtered_combined.info $(MAKE) -C src/ check $(LCOV) -c -d $(abs_builddir)/src -t test_darkcoin -o $@ $(LCOV) -z -d $(abs_builddir)/src $(LCOV) -z -d $(abs_builddir)/src/leveldb -test_bitcoin_filtered.info: test_bitcoin.info +test_darkcoin_filtered.info: test_darkcoin.info $(LCOV) -r $< "/usr/include/*" -o $@ -block_test.info: test_bitcoin_filtered.info +block_test.info: test_darkcoin_filtered.info $(MKDIR_P) qa/tmp -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@ @@ -138,13 +138,13 @@ block_test.info: test_bitcoin_filtered.info block_test_filtered.info: block_test.info $(LCOV) -r $< "/usr/include/*" -o $@ -test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info - $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ +test_darkcoin_coverage.info: baseline_filtered_combined.info test_darkcoin_filtered.info + $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_darkcoin_filtered.info -o $@ -total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info - $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt +total_coverage.info: baseline_filtered_combined.info test_darkcoin_filtered.info block_test_filtered.info + $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_darkcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt -test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info +test_darkcoin.coverage/.dirstamp: test_darkcoin_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ @@ -152,7 +152,7 @@ total.coverage/.dirstamp: total_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ -cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp +cov: test_darkcoin.coverage/.dirstamp total.coverage/.dirstamp endif @@ -169,4 +169,4 @@ CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) .INTERMEDIATE: $(COVERAGE_INFO) clean-local: - rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP) + rm -rf test_darkcoin.coverage/ total.coverage/ $(OSX_APP) diff --git a/contrib/debian/rules b/contrib/debian/rules index 52b357cf01a50..692d283323c7a 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -1,9 +1,9 @@ #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- -#DEB_MAKE_CHECK_TARGET = test_bitcoin +#DEB_MAKE_CHECK_TARGET = test_darkcoin #build/bitcoind:: -# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin) +# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_darkcoin) DEB_INSTALL_EXAMPLES_bitcoind += debian/examples/* DEB_INSTALL_MANPAGES_bitcoind += debian/manpages/* diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index a57b4e561e618..e440a534c4d2b 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -64,10 +64,10 @@ If only supported symbols are used the return value will be 0 and the output wil If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed: - .../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14 - .../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15 - .../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15 - .../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15 + .../64/test_darkcoin: symbol memcpy from unsupported version GLIBC_2.14 + .../64/test_darkcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15 + .../64/test_darkcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15 + .../64/test_darkcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15 update-translations.py ======================= diff --git a/doc/unit-tests.md b/doc/unit-tests.md index f1d3a8bc50646..fe4104a18cb73 100644 --- a/doc/unit-tests.md +++ b/doc/unit-tests.md @@ -6,7 +6,7 @@ and tests weren't explicitly disabled. After configuring, they can be run with 'make check'. -To run the bitcoind tests manually, launch src/test/test_bitcoin . +To run the bitcoind tests manually, launch src/test/test_darkcoin . To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing .cpp files in the test/ directory or add new .cpp files that diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in index ebf377a489c20..23098f1194b99 100755 --- a/qa/pull-tester/build-tests.sh.in +++ b/qa/pull-tester/build-tests.sh.in @@ -59,11 +59,11 @@ if [ -d "$OUT_DIR" -a -w "$OUT_DIR" ]; then set +e # Windows: cp @abs_top_srcdir@/win32-build/src/bitcoind.exe $OUT_DIR/bitcoind.exe - cp @abs_top_srcdir@/win32-build/src/test/test_bitcoin.exe $OUT_DIR/test_bitcoin.exe + cp @abs_top_srcdir@/win32-build/src/test/test_darkcoin.exe $OUT_DIR/test_darkcoin.exe cp @abs_top_srcdir@/win32-build/src/qt/bitcoind-qt.exe $OUT_DIR/bitcoin-qt.exe # Linux: cp @abs_top_srcdir@/linux-build/src/bitcoind $OUT_DIR/bitcoind - cp @abs_top_srcdir@/linux-build/src/test/test_bitcoin $OUT_DIR/test_bitcoin + cp @abs_top_srcdir@/linux-build/src/test/test_darkcoin $OUT_DIR/test_darkcoin cp @abs_top_srcdir@/linux-build/src/qt/bitcoind-qt $OUT_DIR/bitcoin-qt set -e fi diff --git a/src/test/README.md b/src/test/README.md index 7efce6f0522f2..894a54144f607 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -5,9 +5,9 @@ sense to simply use this framework rather than require developers to configure some other framework (we want as few impediments to creating unit tests as possible). -The build system is setup to compile an executable called "test_bitcoin" +The build system is setup to compile an executable called "test_darkcoin" that runs all of the unit tests. The main source file is called -test_bitcoin.cpp, which simply includes other files that contain the +test_darkcoin.cpp, which simply includes other files that contain the actual unit tests (outside of a couple required preprocessor directives). The pattern is to create one test file for each class or source file for which you want to create unit tests. The file naming diff --git a/src/test/test_darkcoin.cpp b/src/test/test_darkcoin.cpp index 2d993e24dbdc4..39b0e7d97367d 100644 --- a/src/test/test_darkcoin.cpp +++ b/src/test/test_darkcoin.cpp @@ -35,7 +35,7 @@ struct TestingSetup { #ifdef ENABLE_WALLET bitdb.MakeMock(); #endif - pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000))); + pathTemp = GetTempPath() / strprintf("test_darkcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000))); boost::filesystem::create_directories(pathTemp); mapArgs["-datadir"] = pathTemp.string(); pblocktree = new CBlockTreeDB(1 << 20, true); From c1aae9e3bdb1e4b4b030dd010e7c737f8138123f Mon Sep 17 00:00:00 2001 From: vertoe Date: Thu, 11 Dec 2014 14:29:22 +0100 Subject: [PATCH 11/11] Change init resource to darkcoin --- src/qt/darkcoin.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/qt/darkcoin.cpp b/src/qt/darkcoin.cpp index d7f2881fff1c4..88016437eacbc 100644 --- a/src/qt/darkcoin.cpp +++ b/src/qt/darkcoin.cpp @@ -74,7 +74,7 @@ static void InitMessage(const std::string &message) */ static std::string Translate(const char* psz) { - return QCoreApplication::translate("bitcoin-core", psz).toStdString(); + return QCoreApplication::translate("darkcoin-core", psz).toStdString(); } /** Set up translations */ @@ -139,7 +139,7 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons } #endif -/** Class encapsulating Bitcoin Core startup and shutdown. +/** Class encapsulating Darkcoin Core startup and shutdown. * Allows running startup and shutdown in a different thread from the UI thread. */ class BitcoinCore: public QObject @@ -423,7 +423,7 @@ void BitcoinApplication::initializeResult(int retval) } #ifdef ENABLE_WALLET // Now that initialization/startup is done, process any command-line - // bitcoin: URIs or payment requests: + // darkcoin: URIs or payment requests: connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)), window, SLOT(handlePaymentRequest(SendCoinsRecipient))); connect(window, SIGNAL(receivedURI(QString)), @@ -445,7 +445,7 @@ void BitcoinApplication::shutdownResult(int retval) void BitcoinApplication::handleRunawayException(const QString &message) { - QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + message); + QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Darkcoin can no longer continue safely and will quit.") + QString("\n\n") + message); ::exit(1); } @@ -475,7 +475,7 @@ int main(int argc, char *argv[]) QTextCodec::setCodecForCStrings(QTextCodec::codecForTr()); #endif - Q_INIT_RESOURCE(bitcoin); + Q_INIT_RESOURCE(darkcoin); GUIUtil::SubstituteFonts(); @@ -521,14 +521,14 @@ int main(int argc, char *argv[]) /// - Do not call GetDataDir(true) before this step finishes if (!boost::filesystem::is_directory(GetDataDir(false))) { - QMessageBox::critical(0, QObject::tr("Bitcoin"), + QMessageBox::critical(0, QObject::tr("Darkcoin"), QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"]))); return 1; } try { ReadConfigFile(mapArgs, mapMultiArgs); } catch(std::exception &e) { - QMessageBox::critical(0, QObject::tr("Bitcoin"), + QMessageBox::critical(0, QObject::tr("Darkcoin"), QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); return false; } @@ -541,7 +541,7 @@ int main(int argc, char *argv[]) // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause) if (!SelectParamsFromCommandLine()) { - QMessageBox::critical(0, QObject::tr("Bitcoin"), QObject::tr("Error: Invalid combination of -regtest and -testnet.")); + QMessageBox::critical(0, QObject::tr("Darkcoin"), QObject::tr("Error: Invalid combination of -regtest and -testnet.")); return 1; } #ifdef ENABLE_WALLET @@ -569,7 +569,7 @@ int main(int argc, char *argv[]) exit(0); // Start up the payment server early, too, so impatient users that click on - // bitcoin: links repeatedly have their payment requests routed to this process: + // darkcoin: links repeatedly have their payment requests routed to this process: app.createPaymentServer(); #endif @@ -601,7 +601,7 @@ int main(int argc, char *argv[]) app.createWindow(isaTestNet); app.requestInitialize(); #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 - WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Bitcoin Core didn't yet exit safely..."), (HWND)app.getMainWinId()); + WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Darkcoin Core didn't yet exit safely..."), (HWND)app.getMainWinId()); #endif app.exec(); app.requestShutdown();