diff options
author | Lee Clagett <code@leeclagett.com> | 2019-11-13 14:12:32 +0000 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-03-26 15:01:30 +0000 |
commit | 02d887c2e58bd8e66ef8823e59669439d448bfec (patch) | |
tree | 0c5ff6825f6555f8930589fa118fe263d29a018b /src/rpc/daemon_handler.cpp | |
parent | Merge pull request #6405 (diff) | |
download | monero-02d887c2e58bd8e66ef8823e59669439d448bfec.tar.xz |
Adding Dandelion++ support to public networks:
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode
- Stem loops detected in tx_pool.cpp
- Embargo timeout for a blackhole attack during stem phase
Diffstat (limited to 'src/rpc/daemon_handler.cpp')
-rw-r--r-- | src/rpc/daemon_handler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index 7292176b4..d05854e34 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -349,10 +349,10 @@ namespace rpc res.error_details = "Invalid hex"; return; } - handleTxBlob(tx_blob, req.relay, res); + handleTxBlob(std::move(tx_blob), req.relay, res); } - void DaemonHandler::handleTxBlob(const std::string& tx_blob, bool relay, SendRawTx::Response& res) + void DaemonHandler::handleTxBlob(std::string&& tx_blob, bool relay, SendRawTx::Response& res) { if (!m_p2p.get_payload_object().is_synchronized()) { @@ -423,7 +423,7 @@ namespace rpc return; } - if(!tvc.m_should_be_relayed || !relay) + if(tvc.m_relay == relay_method::none || !relay) { MERROR("[SendRawTx]: tx accepted, but not relayed"); res.error_details = "Not relayed"; @@ -434,8 +434,8 @@ namespace rpc } NOTIFY_NEW_TRANSACTIONS::request r; - r.txs.push_back(tx_blob); - m_core.get_protocol()->relay_transactions(r, boost::uuids::nil_uuid(), epee::net_utils::zone::invalid); + r.txs.push_back(std::move(tx_blob)); + m_core.get_protocol()->relay_transactions(r, boost::uuids::nil_uuid(), epee::net_utils::zone::invalid, relay_method::local); //TODO: make sure that tx has reached other nodes here, probably wait to receive reflections from other nodes res.status = Message::STATUS_OK; |