diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-03-24 19:33:35 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-03-24 19:33:36 +0200 |
commit | 0920ac76429419699ff620e73bf6b46a1d012097 (patch) | |
tree | 3a53c6754b886015605e708fd6d0b7dca26acc75 /src/rpc/daemon_messages.cpp | |
parent | Merge pull request #5324 (diff) | |
parent | rpc: Allow submitting tx as hex blob over ZMQ (diff) | |
download | monero-0920ac76429419699ff620e73bf6b46a1d012097.tar.xz |
Merge pull request #5207
be6f426a rpc: Allow submitting tx as hex blob over ZMQ (Nathan Dorfman)
Diffstat (limited to 'src/rpc/daemon_messages.cpp')
-rw-r--r-- | src/rpc/daemon_messages.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rpc/daemon_messages.cpp b/src/rpc/daemon_messages.cpp index ecd3683e5..cf0f5ece1 100644 --- a/src/rpc/daemon_messages.cpp +++ b/src/rpc/daemon_messages.cpp @@ -42,6 +42,7 @@ const char* const GetTransactions::name = "get_transactions"; const char* const KeyImagesSpent::name = "key_images_spent"; const char* const GetTxGlobalOutputIndices::name = "get_tx_global_output_indices"; const char* const SendRawTx::name = "send_raw_tx"; +const char* const SendRawTxHex::name = "send_raw_tx_hex"; const char* const StartMining::name = "start_mining"; const char* const StopMining::name = "stop_mining"; const char* const MiningStatus::name = "mining_status"; @@ -292,6 +293,22 @@ void SendRawTx::Response::fromJson(rapidjson::Value& val) GET_FROM_JSON_OBJECT(val, relayed, relayed); } +rapidjson::Value SendRawTxHex::Request::toJson(rapidjson::Document& doc) const +{ + auto val = Message::toJson(doc); + + INSERT_INTO_JSON_OBJECT(val, doc, tx_as_hex, tx_as_hex); + INSERT_INTO_JSON_OBJECT(val, doc, relay, relay); + + return val; +} + +void SendRawTxHex::Request::fromJson(rapidjson::Value& val) +{ + GET_FROM_JSON_OBJECT(val, tx_as_hex, tx_as_hex); + GET_FROM_JSON_OBJECT(val, relay, relay); +} + rapidjson::Value StartMining::Request::toJson(rapidjson::Document& doc) const { auto val = Message::toJson(doc); |