From 8948576a8a4e3eac1d0bbff94f498992d3ae9001 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 2 Oct 2014 14:55:53 -0700 Subject: [PATCH] remove hex strings to bitcoind objects. --- src/bitcoindjs.cc | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 8be45d1c..9bc01fd7 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -243,12 +243,6 @@ jsblock_to_cblock(const Local jsblock, CBlock& cblock); static inline void jstx_to_ctx(const Local jstx, CTransaction& ctx); -static inline void -hexblock_to_cblock(std::string block_hex, CBlock& cblock); - -static inline void -hextx_to_ctx(std::string tx_hex, CTransaction& ctx); - extern "C" void init(Handle); @@ -2654,26 +2648,6 @@ ctx_to_jstx(const CTransaction& ctx, uint256 block_hash, Local jstx) { } } -static inline void -hexblock_to_cblock(std::string block_hex, CBlock& cblock) { - CDataStream ssData(ParseHex(block_hex), SER_NETWORK, PROTOCOL_VERSION); - try { - ssData >> cblock; - } catch (std::exception &e) { - NanThrowError("Block decode failed"); - } -} - -static inline void -hextx_to_ctx(std::string tx_hex, CTransaction& ctx) { - CDataStream ssData(ParseHex(tx_hex), SER_NETWORK, PROTOCOL_VERSION); - try { - ssData >> ctx; - } catch (std::exception &e) { - NanThrowError("TX decode failed"); - } -} - static inline void jsblock_to_cblock(const Local jsblock, CBlock& cblock) { cblock.nVersion = (int)jsblock->Get(NanNew("version"))->IntegerValue();