mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp
This commit is contained in:
parent
2920322871
commit
ae775b5b31
7 changed files with 73 additions and 33 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue