mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +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
|
|
@ -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()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue