@@ -135,7 +135,6 @@ namespace cryptonote
135135 " sync-pruned-blocks"
136136 , " Allow syncing from nodes with only pruned blocks"
137137 };
138-
139138 static const command_line::arg_descriptor<bool > arg_test_drop_download = {
140139 " test-drop-download"
141140 , " For net tests: in download, discard ALL blocks instead checking/saving them (very fast)"
@@ -821,7 +820,7 @@ namespace cryptonote
821820 return false ;
822821 }
823822 // -----------------------------------------------------------------------------------------------
824- bool core::handle_incoming_tx (const blobdata& tx_blob, tx_verification_context& tvc, relay_method tx_relay, bool relayed)
823+ bool core::handle_incoming_tx (const blobdata& tx_blob, tx_verification_context& tvc, relay_method tx_relay, bool relayed, crypto::hash& txid )
825824 {
826825 tvc = {};
827826
@@ -838,7 +837,6 @@ namespace cryptonote
838837 }
839838
840839 transaction tx;
841- crypto::hash txid;
842840 if (!parse_and_validate_tx_from_blob (tx_blob, tx, txid))
843841 {
844842 LOG_PRINT_L1 (" Incoming transactions failed to parse, rejected" );
@@ -1173,6 +1171,9 @@ namespace cryptonote
11731171 NOTIFY_NEW_TRANSACTIONS ::request public_req{};
11741172 NOTIFY_NEW_TRANSACTIONS ::request private_req{};
11751173 NOTIFY_NEW_TRANSACTIONS ::request stem_req{};
1174+ std::vector<crypto::hash> public_tx_hashes{};
1175+ std::vector<crypto::hash> private_tx_hashes{};
1176+ std::vector<crypto::hash> stem_tx_hashes{};
11761177 for (auto & tx : txs)
11771178 {
11781179 switch (std::get<2 >(tx))
@@ -1182,14 +1183,17 @@ namespace cryptonote
11821183 break ;
11831184 case relay_method::local:
11841185 private_req.txs .push_back (std::move (std::get<1 >(tx)));
1186+ private_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11851187 break ;
11861188 case relay_method::forward:
11871189 stem_req.txs .push_back (std::move (std::get<1 >(tx)));
1190+ stem_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11881191 break ;
11891192 case relay_method::block:
11901193 case relay_method::fluff:
11911194 case relay_method::stem:
11921195 public_req.txs .push_back (std::move (std::get<1 >(tx)));
1196+ public_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11931197 break ;
11941198 }
11951199 }
@@ -1200,11 +1204,11 @@ namespace cryptonote
12001204 re-relaying public and private _should_ be acceptable here. */
12011205 const boost::uuids::uuid source = boost::uuids::nil_uuid ();
12021206 if (!public_req.txs .empty ())
1203- get_protocol ()->relay_transactions (public_req, source, epee::net_utils::zone::public_, relay_method::fluff);
1207+ get_protocol ()->relay_transactions (public_req, std::move (public_tx_hashes), source, epee::net_utils::zone::public_, relay_method::fluff);
12041208 if (!private_req.txs .empty ())
1205- get_protocol ()->relay_transactions (private_req, source, epee::net_utils::zone::invalid, relay_method::local);
1209+ get_protocol ()->relay_transactions (private_req, std::move (private_tx_hashes), source, epee::net_utils::zone::invalid, relay_method::local);
12061210 if (!stem_req.txs .empty ())
1207- get_protocol ()->relay_transactions (stem_req, source, epee::net_utils::zone::public_, relay_method::stem);
1211+ get_protocol ()->relay_transactions (stem_req, std::move (stem_tx_hashes), source, epee::net_utils::zone::public_, relay_method::stem);
12081212 }
12091213 return true ;
12101214 }
@@ -1918,9 +1922,9 @@ namespace cryptonote
19181922 m_blockchain_storage.flush_invalid_blocks ();
19191923 }
19201924 // -----------------------------------------------------------------------------------------------
1921- bool core::get_txpool_complement (std::vector<crypto::hash> hashes, std::vector<cryptonote::blobdata > &txes )
1925+ bool core::get_txpool_complement (std::vector<crypto::hash> hashes, std::vector<crypto::hash > &inv_txes )
19221926 {
1923- return m_mempool.get_complement (std::move (hashes), txes );
1927+ return m_mempool.get_complement (std::move (hashes), inv_txes );
19241928 }
19251929 // -----------------------------------------------------------------------------------------------
19261930 bool core::update_blockchain_pruning ()
0 commit comments