Monero
Loading...
Searching...
No Matches
cryptonote::levin::notify Class Reference

Provides tx notification privacy. More...

#include <levin_notify.h>

Collaboration diagram for cryptonote::levin::notify:

Classes

struct  status

Public Member Functions

 notify () noexcept
 Construct an instance that cannot notify.
 notify (boost::asio::io_context &service, std::shared_ptr< connections > p2p, epee::byte_slice noise, epee::net_utils::zone zone, bool pad_txs, i_core_events &core)
 Construct an instance with available notification zones.
 notify (const notify &)=delete
 notify (notify &&)=default
 ~notify () noexcept
notifyoperator= (const notify &)=delete
notifyoperator= (notify &&)=default
status get_status () const noexcept
void new_out_connection ()
 Probe for new outbound connection - skips if not needed.
void on_handshake_complete (const boost::uuids::uuid &id, bool is_income)
void on_connection_close (const boost::uuids::uuid &id)
void run_epoch ()
 Run the logic for the next epoch immediately. Only use in testing.
void run_stems ()
 Run the logic for the next stem timeout imemdiately. Only use in testing.
void run_fluff ()
 Run the logic for flushing all Dandelion++ fluff queued txs. Only use in testing.
bool send_txs (std::vector< blobdata > txs, const boost::uuids::uuid &source, relay_method tx_relay)

Private Attributes

std::shared_ptr< detail::zonezone_
i_core_eventscore_

Detailed Description

Provides tx notification privacy.

Constructor & Destructor Documentation

◆ notify() [1/4]

cryptonote::levin::notify::notify ( )
inlinenoexcept

Construct an instance that cannot notify.

◆ notify() [2/4]

cryptonote::levin::notify::notify ( boost::asio::io_context & service,
std::shared_ptr< connections > p2p,
epee::byte_slice noise,
epee::net_utils::zone zone,
bool pad_txs,
i_core_events & core )
explicit

Construct an instance with available notification zones.

◆ notify() [3/4]

cryptonote::levin::notify::notify ( const notify & )
delete

◆ notify() [4/4]

cryptonote::levin::notify::notify ( notify && )
default

◆ ~notify()

cryptonote::levin::notify::~notify ( )
noexcept

Member Function Documentation

◆ get_status()

notify::status cryptonote::levin::notify::get_status ( ) const
noexcept
Returns
Status information for zone selection.

◆ new_out_connection()

void cryptonote::levin::notify::new_out_connection ( )

Probe for new outbound connection - skips if not needed.

◆ on_connection_close()

void cryptonote::levin::notify::on_connection_close ( const boost::uuids::uuid & id)

◆ on_handshake_complete()

void cryptonote::levin::notify::on_handshake_complete ( const boost::uuids::uuid & id,
bool is_income )

◆ operator=() [1/2]

notify & cryptonote::levin::notify::operator= ( const notify & )
delete

◆ operator=() [2/2]

notify & cryptonote::levin::notify::operator= ( notify && )
default

◆ run_epoch()

void cryptonote::levin::notify::run_epoch ( )

Run the logic for the next epoch immediately. Only use in testing.

◆ run_fluff()

void cryptonote::levin::notify::run_fluff ( )

Run the logic for flushing all Dandelion++ fluff queued txs. Only use in testing.

◆ run_stems()

void cryptonote::levin::notify::run_stems ( )

Run the logic for the next stem timeout imemdiately. Only use in testing.

◆ send_txs()

bool cryptonote::levin::notify::send_txs ( std::vector< blobdata > txs,
const boost::uuids::uuid & source,
relay_method tx_relay )

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 Dandelion++ fluff algorithm will be used.

Note
Eventually Dandelion++ stem sending will be used here when enabled.
Parameters
txsThe transactions that need to be serialized and relayed.
sourceThe source of the notification. is_nil() indicates this node is the source. Dandelion++ will use this to map a source to a particular stem.
Returns
True iff the notification is queued for sending.

Member Data Documentation

◆ core_

i_core_events* cryptonote::levin::notify::core_
private

◆ zone_

std::shared_ptr<detail::zone> cryptonote::levin::notify::zone_
private

The documentation for this class was generated from the following files: