mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user