Dandelion++: skip desynced peers in stem phase

This commit is contained in:
xiphon 2020-10-12 12:32:17 +00:00
parent 3cbb44a2fd
commit a12a8174e0
9 changed files with 78 additions and 64 deletions

View file

@ -69,6 +69,7 @@ namespace levin
class notify
{
std::shared_ptr<detail::zone> zone_;
i_core_events* core_;
public:
struct status
@ -80,10 +81,11 @@ namespace levin
//! Construct an instance that cannot notify.
notify() noexcept
: zone_(nullptr)
, core_(nullptr)
{}
//! Construct an instance with available notification `zones`.
explicit notify(boost::asio::io_service& service, std::shared_ptr<connections> p2p, epee::byte_slice noise, bool is_public, bool pad_txs);
explicit notify(boost::asio::io_service& service, std::shared_ptr<connections> p2p, epee::byte_slice noise, bool is_public, bool pad_txs, i_core_events& core);
notify(const notify&) = delete;
notify(notify&&) = default;
@ -123,7 +125,7 @@ namespace levin
particular stem.
\return True iff the notification is queued for sending. */
bool send_txs(std::vector<blobdata> txs, const boost::uuids::uuid& source, i_core_events& core, relay_method tx_relay);
bool send_txs(std::vector<blobdata> txs, const boost::uuids::uuid& source, relay_method tx_relay);
};
} // levin
} // net