aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-05 19:13:24 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-05 20:15:54 +0100
commit5c9dd23b1cc8d61beceaf51588bbf08936d25711 (patch)
treeec211282d9837e9ddbdd8b2442f91dcd6cb4c8d8 /src/rpc
parentMerge pull request #780 (diff)
downloadmonero-5c9dd23b1cc8d61beceaf51588bbf08936d25711.tar.xz
rpc: add a do_not_relay boolean to tx submission
Just to make it easier
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 165a24c22..988ee554a 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -383,7 +383,7 @@ namespace cryptonote
return true;
}
- if(!tvc.m_should_be_relayed)
+ if(!tvc.m_should_be_relayed || req.do_not_relay)
{
LOG_PRINT_L0("[on_send_raw_tx]: tx accepted, but not relayed");
res.reason = "Not relayed";
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 91f5e2c90..4ef3fc17e 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -221,12 +221,14 @@ namespace cryptonote
struct request
{
std::string tx_as_hex;
+ bool do_not_relay;
request() {}
explicit request(const transaction &);
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(tx_as_hex)
+ KV_SERIALIZE(do_not_relay)
END_KV_SERIALIZE_MAP()
};