mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +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
15
src/core_write.cpp
Normal file
15
src/core_write.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
#include "core_io.h"
|
||||
#include "core.h"
|
||||
#include "serialize.h"
|
||||
#include "util.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
string EncodeHexTx(const CTransaction& tx)
|
||||
{
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << tx;
|
||||
return HexStr(ssTx.begin(), ssTx.end());
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue