aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.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/rpcmining.cpp
parent29203228710de3e180914c1d66f48dd7e41270a0 (diff)
downloadbitcoin-ae775b5b311982a3d932a9e34ddc94ce597dcaaf.tar.xz
Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index cbb4ab2f8b..edab427cbf 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -10,6 +10,7 @@
#include "main.h"
#include "miner.h"
#include "pow.h"
+#include "core_io.h"
#ifdef ENABLE_WALLET
#include "db.h"
#include "wallet.h"
@@ -472,9 +473,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
Object entry;
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
- ssTx << tx;
- entry.push_back(Pair("data", HexStr(ssTx.begin(), ssTx.end())));
+ entry.push_back(Pair("data", EncodeHexTx(tx)));
entry.push_back(Pair("hash", txHash.GetHex()));