From 83e2c05be75396e54e0a52b8e3291334f7e24df3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 9 Dec 2014 14:18:03 -0800 Subject: [PATCH] remove dead code used to resolve unknown prev_outs. --- src/bitcoindjs.cc | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 7f584990..f62cbc90 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -5980,39 +5980,6 @@ ctx_to_jstx(const CTransaction& ctx, uint256 blockhash, Local jstx) { } jstx->Set(NanNew("vout"), vout); -#if 0 - int jvi = 0; - Local jsvin = Local::Cast(jstx->Get(NanNew("vin"))); - for (; jvi < jsvin->Length(); jvi++) { - Local jsprev = Local::Cast(jsvin->Get(NanNew("prev"))); - Utf8Value jsaddr_(jsprev->Get(NanNew("address"))->ToString()); - std::string jsaddr = std::string(*jsaddr_); - if (jsaddr == "Unknown") { - Local jsvout = Local::Cast(jstx->Get(NanNew("vout"))); - Local jsspk = Local::Cast(jsvout->Get(NanNew("scriptPubKey"))); - Local jsaddrs = Local::Cast(jsvout->Get(NanNew("addresses"))); - Utf8Value jsa_(jsaddrs->Get(0)->ToString()); - std::string jsa = std::string(*jsa_); - jsprev->Set(NanNew("address"), NanNew(std::string(jsa + std::string("-fixed")))); - } - } - - const CTxOut& txout = ctx.vout[txin.prevout.n]; - for (unsigned int vo = 0; vo < ctx.vout.size(); vo++) { - const CTxOut& txout = ctx.vout[vo]; - out->Set(NanNew("n"), NanNew((unsigned int)vo)->ToUint32()); - const CScript& scriptPubKey = txout.scriptPubKey; - txnouttype type; - vector addresses; - int nRequired; - if (ExtractDestinations(scriptPubKey, type, addresses, nRequired)) { - BOOST_FOREACH(const CTxDestination& addr, addresses) { - std::string addr = CBitcoinAddress(addr).ToString(); - } - } - } -#endif - // Find block hash if it's in our wallet bool is_mine = false; CWalletTx cwtx;