aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2014-06-23 23:10:24 -0400
committerJeff Garzik <jgarzik@bitpay.com>2014-07-29 11:13:27 -0400
commitae775b5b311982a3d932a9e34ddc94ce597dcaaf (patch)
tree39bdd6b040c905395473564b0d2e6c7808270133 /src/rpcwallet.cpp
parent29203228710de3e180914c1d66f48dd7e41270a0 (diff)
downloadbitcoin-ae775b5b311982a3d932a9e34ddc94ce597dcaaf.tar.xz
Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r--src/rpcwallet.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 5b83fe900e..667ca33ce1 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -4,6 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
+#include "core_io.h"
#include "rpcserver.h"
#include "init.h"
#include "net.h"
@@ -1550,9 +1551,7 @@ Value gettransaction(const Array& params, bool fHelp)
ListTransactions(wtx, "*", 0, false, details, filter);
entry.push_back(Pair("details", details));
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
- ssTx << static_cast<CTransaction>(wtx);
- string strHex = HexStr(ssTx.begin(), ssTx.end());
+ string strHex = EncodeHexTx(static_cast<CTransaction>(wtx));
entry.push_back(Pair("hex", strHex));
return entry;