@@ -778,7 +778,7 @@ namespace cryptonote
778778 return true ;
779779 }
780780 // -----------------------------------------------------------------------------------------------
781- bool core::handle_incoming_tx (const blobdata& tx_blob, tx_verification_context& tvc, relay_method tx_relay, bool relayed)
781+ bool core::handle_incoming_tx (const blobdata& tx_blob, tx_verification_context& tvc, relay_method tx_relay, bool relayed, crypto::hash& txid )
782782 {
783783 tvc = {};
784784
@@ -795,7 +795,6 @@ namespace cryptonote
795795 }
796796
797797 transaction tx;
798- crypto::hash txid;
799798 if (!parse_and_validate_tx_from_blob (tx_blob, tx, txid))
800799 {
801800 LOG_PRINT_L1 (" Incoming transactions failed to parse, rejected" );
@@ -1130,6 +1129,9 @@ namespace cryptonote
11301129 NOTIFY_NEW_TRANSACTIONS ::request public_req{};
11311130 NOTIFY_NEW_TRANSACTIONS ::request private_req{};
11321131 NOTIFY_NEW_TRANSACTIONS ::request stem_req{};
1132+ std::vector<crypto::hash> public_tx_hashes{};
1133+ std::vector<crypto::hash> private_tx_hashes{};
1134+ std::vector<crypto::hash> stem_tx_hashes{};
11331135 for (auto & tx : txs)
11341136 {
11351137 switch (std::get<2 >(tx))
@@ -1139,14 +1141,17 @@ namespace cryptonote
11391141 break ;
11401142 case relay_method::local:
11411143 private_req.txs .push_back (std::move (std::get<1 >(tx)));
1144+ private_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11421145 break ;
11431146 case relay_method::forward:
11441147 stem_req.txs .push_back (std::move (std::get<1 >(tx)));
1148+ stem_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11451149 break ;
11461150 case relay_method::block:
11471151 case relay_method::fluff:
11481152 case relay_method::stem:
11491153 public_req.txs .push_back (std::move (std::get<1 >(tx)));
1154+ public_tx_hashes.push_back (std::move (std::get<0 >(tx)));
11501155 break ;
11511156 }
11521157 }
@@ -1157,11 +1162,11 @@ namespace cryptonote
11571162 re-relaying public and private _should_ be acceptable here. */
11581163 const boost::uuids::uuid source = boost::uuids::nil_uuid ();
11591164 if (!public_req.txs .empty ())
1160- get_protocol ()->relay_transactions (public_req, source, epee::net_utils::zone::public_, relay_method::fluff);
1165+ get_protocol ()->relay_transactions (public_req, std::move (public_tx_hashes), source, epee::net_utils::zone::public_, relay_method::fluff);
11611166 if (!private_req.txs .empty ())
1162- get_protocol ()->relay_transactions (private_req, source, epee::net_utils::zone::invalid, relay_method::local);
1167+ get_protocol ()->relay_transactions (private_req, std::move (private_tx_hashes), source, epee::net_utils::zone::invalid, relay_method::local);
11631168 if (!stem_req.txs .empty ())
1164- get_protocol ()->relay_transactions (stem_req, source, epee::net_utils::zone::public_, relay_method::stem);
1169+ get_protocol ()->relay_transactions (stem_req, std::move (stem_tx_hashes), source, epee::net_utils::zone::public_, relay_method::stem);
11651170 }
11661171 return true ;
11671172 }
@@ -1875,9 +1880,9 @@ namespace cryptonote
18751880 m_blockchain_storage.flush_invalid_blocks ();
18761881 }
18771882 // -----------------------------------------------------------------------------------------------
1878- bool core::get_txpool_complement (std::vector<crypto::hash> hashes, std::vector<cryptonote::blobdata > &txes )
1883+ bool core::get_txpool_complement (std::vector<crypto::hash> hashes, std::vector<crypto::hash > &inv_txes )
18791884 {
1880- return m_mempool.get_complement (std::move (hashes), txes );
1885+ return m_mempool.get_complement (std::move (hashes), inv_txes );
18811886 }
18821887 // -----------------------------------------------------------------------------------------------
18831888 bool core::update_blockchain_pruning ()
0 commit comments