From cbda3b330ab950ffa9968169f8d249680fe47ba3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 1 Dec 2014 13:44:44 -0800 Subject: [PATCH] remove old and new comments. --- src/bitcoindjs.cc | 56 +++-------------------------------------------- 1 file changed, 3 insertions(+), 53 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 836d671c..67e74728 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -27,7 +27,6 @@ * secp256k1 */ -// XXX NEW #include /** @@ -52,14 +51,8 @@ #include "coincontrol.h" #include "coins.h" #include "compat.h" - -// XXX OLD -// #include "core.h" - -// XXX NEW #include "core/block.h" #include "core/transaction.h" - #include "core_io.h" #include "crypter.h" #include "db.h" @@ -82,19 +75,12 @@ #include "rpcprotocol.h" #include "rpcserver.h" #include "rpcwallet.h" - -// XXX OLD -// #include "script/compressor.h" - #include "script/interpreter.h" #include "script/script.h" #include "script/sigcache.h" #include "script/sign.h" #include "script/standard.h" - -// XXX NEW #include "script/script_error.h" - #include "serialize.h" #include "sync.h" #include "threadsafety.h" @@ -124,13 +110,6 @@ #include "json/json_spirit_writer.h" #include "json/json_spirit_writer_template.h" -// XXX OLD -// #include "crypto/common.h" -// #include "crypto/sha2.h" -// #include "crypto/sha1.h" -// #include "crypto/ripemd160.h" - -// XXX NEW #include "crypto/common.h" #include "crypto/hmac_sha512.h" #include "crypto/sha1.h" @@ -1638,13 +1617,7 @@ NAN_METHOD(GetInfo) { obj->Set(NanNew("connections"), NanNew((int)vNodes.size())->ToInt32()); obj->Set(NanNew("proxy"), NanNew(proxy.IsValid() ? proxy.ToStringIPPort() : std::string(""))); obj->Set(NanNew("difficulty"), NanNew((double)GetDifficulty())); - - // XXX OLD - // obj->Set(NanNew("testnet"), NanNew(Params().NetworkID() == CBaseChainParams::TESTNET)); - - // XXX NEW obj->Set(NanNew("testnet"), NanNew(Params().NetworkIDString() == "test")); - #ifdef ENABLE_WALLET if (pwalletMain) { obj->Set(NanNew("keypoololdest"), NanNew(pwalletMain->GetOldestKeyPoolTime())); @@ -1715,8 +1688,6 @@ NAN_METHOD(GetPeerInfo) { if (fStateStats) { obj->Set(NanNew("banscore"), NanNew(statestats.nMisbehavior)); obj->Set(NanNew("syncheight"), NanNew(statestats.nSyncHeight)->ToInt32()); - - // XXX NEW obj->Set(NanNew("synced_headers"), NanNew(statestats.nSyncHeight)->ToInt32()); obj->Set(NanNew("synced_blocks"), NanNew(statestats.nCommonHeight)->ToInt32()); Local heights = NanNew(); @@ -1728,9 +1699,6 @@ NAN_METHOD(GetPeerInfo) { obj->Set(NanNew("inflight"), heights); } - // XXX OLD - // obj->Set(NanNew("syncnode"), NanNew(stats.fSyncNode)); - obj->Set(NanNew("whitelisted"), NanNew(stats.fWhitelisted)); // obj->Set(NanNew("relaytxes"), NanNew(stats.fRelayTxes)); @@ -2018,13 +1986,7 @@ NAN_METHOD(GetMiningInfo) { obj->Set(NanNew("networkhashps"), NanNew( (int64_t)getnetworkhashps(empty_params, false).get_int64())); obj->Set(NanNew("pooledtx"), NanNew((uint64_t)mempool.size())); - - // XXX OLD - // obj->Set(NanNew("testnet"), NanNew(Params().NetworkID() == CBaseChainParams::TESTNET)); - - // XXX NEW obj->Set(NanNew("testnet"), NanNew(Params().NetworkIDString() == "test")); - obj->Set(NanNew("chain"), NanNew(Params().NetworkIDString())); #ifdef ENABLE_WALLET obj->Set(NanNew("generate"), NanNew( @@ -3848,16 +3810,18 @@ NAN_METHOD(WalletCreateMultiSigAddress) { NanReturnValue(Undefined()); } - // XXX NEW std::string strAccount = ""; + if (options->Get(NanNew("account"))->IsString()) { String::Utf8Value account_(options->Get(NanNew("account"))->ToString()); strAccount = std::string(*account_); } + if (options->Get(NanNew("label"))->IsString()) { String::Utf8Value account_(options->Get(NanNew("label"))->ToString()); strAccount = std::string(*account_); } + if (options->Get(NanNew("name"))->IsString()) { String::Utf8Value account_(options->Get(NanNew("name"))->ToString()); strAccount = std::string(*account_); @@ -3866,10 +3830,6 @@ NAN_METHOD(WalletCreateMultiSigAddress) { // Construct using pay-to-script-hash: CScript inner = _createmultisig_redeemScript(nRequired, keys); - // XXX OLD - // CScriptID innerID = inner.GetID(); - - // XXX NEW CScriptID innerID(inner); pwalletMain->AddCScript(inner); pwalletMain->SetAddressBook(innerID, strAccount, "send"); @@ -5920,11 +5880,6 @@ jstx_to_ctx(const Local jstx, CTransaction& ctx_) { String::AsciiValue shash__(script_obj->Get(NanNew("hex"))->ToString()); shash_ = *shash__; - // XXX OLD - // uint256 shash(shash_); - // CScript scriptSig(shash); - - // XXX NEW std::vector shash(shash_.begin(), shash_.end()); CScript scriptSig(shash.begin(), shash.end()); @@ -5947,11 +5902,6 @@ jstx_to_ctx(const Local jstx, CTransaction& ctx_) { String::AsciiValue phash__(script_obj->Get(NanNew("hex"))); std::string phash_ = *phash__; - // XXX OLD - // uint256 phash(phash_); - // CScript scriptPubKey(phash); - - // XXX NEW std::vector phash(phash_.begin(), phash_.end()); CScript scriptPubKey(phash.begin(), phash.end());