diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2014-06-23 23:10:24 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2014-07-29 11:13:27 -0400 |
commit | ae775b5b311982a3d932a9e34ddc94ce597dcaaf (patch) | |
tree | 39bdd6b040c905395473564b0d2e6c7808270133 /src/core_write.cpp | |
parent | 29203228710de3e180914c1d66f48dd7e41270a0 (diff) |
Consolidate CTransaction hex encode/decode into core_io.h, core_{read,write}.cpp
Diffstat (limited to 'src/core_write.cpp')
-rw-r--r-- | src/core_write.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp new file mode 100644 index 0000000000..960974df89 --- /dev/null +++ b/src/core_write.cpp @@ -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()); +} + |