aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/levin_notify.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_protocol/levin_notify.h')
-rw-r--r--src/cryptonote_protocol/levin_notify.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/cryptonote_protocol/levin_notify.h b/src/cryptonote_protocol/levin_notify.h
index 484243af5..ce652d933 100644
--- a/src/cryptonote_protocol/levin_notify.h
+++ b/src/cryptonote_protocol/levin_notify.h
@@ -35,6 +35,7 @@
#include "byte_slice.h"
#include "cryptonote_basic/blobdatatype.h"
+#include "cryptonote_protocol/fwd.h"
#include "net/enums.h"
#include "span.h"
@@ -53,11 +54,6 @@ namespace nodetool
namespace cryptonote
{
- struct cryptonote_connection_context;
-}
-
-namespace cryptonote
-{
namespace levin
{
namespace detail
@@ -86,7 +82,7 @@ namespace levin
{}
//! 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);
+ explicit notify(boost::asio::io_service& service, std::shared_ptr<connections> p2p, epee::byte_slice noise, bool is_public, bool pad_txs);
notify(const notify&) = delete;
notify(notify&&) = default;
@@ -108,11 +104,14 @@ namespace levin
//! Run the logic for the next stem timeout imemdiately. Only use in testing.
void run_stems();
+ //! Run the logic for flushing all Dandelion++ fluff queued txs. Only use in testing.
+ void run_fluff();
+
/*! Send txs using `cryptonote_protocol_defs.h` payload format wrapped in a
levin header. The message will be sent in a "discreet" manner if
enabled - if `!noise.empty()` then the `command`/`payload` will be
queued to send at the next available noise interval. Otherwise, a
- standard Monero flood notification will be used.
+ Dandelion++ fluff algorithm will be used.
\note Eventually Dandelion++ stem sending will be used here when
enabled.
@@ -121,12 +120,9 @@ namespace levin
\param source The source of the notification. `is_nil()` indicates this
node is the source. Dandelion++ will use this to map a source to a
particular stem.
- \param pad_txs A request to pad txs to help conceal origin via
- statistical analysis. Ignored if noise was enabled during
- construction.
\return True iff the notification is queued for sending. */
- bool send_txs(std::vector<blobdata> txs, const boost::uuids::uuid& source, bool pad_txs);
+ bool send_txs(std::vector<blobdata> txs, const boost::uuids::uuid& source);
};
} // levin
} // net