[][src]Struct damn_vuln_blockchain::client::Client

pub struct Client {
    pub client: awc,
}

Client wrapper for p2p communication

Fields

client: awc

Implementations

impl Client[src]

pub async fn peer_enroll<'_, '_>(&'_ self, config: &'_ Config)[src]

enrolls peer with the auditor enode

pub async fn set_attack<'_, '_>(&'_ self, config: &'_ Config)[src]

set attack

pub async fn get_stake<'_, '_>(
    &'_ self,
    peer: GetStake,
    config: &'_ Config
) -> Stake
[src]

get stake for a block

pub async fn peer_discovery<'_, '_>(&'_ self, config: &'_ Config)[src]

gets list of peers from auditor, should be called periodically

pub async fn get_all_assets<'_, '_>(&'_ self, config: &'_ Config)[src]

gets asset ledger from auditor node, should be called periodically

pub async fn send_tx_to_validator<'_, '_, '_>(
    &'_ self,
    validator: &'_ Peer,
    payload: &'_ ValidateTx
)
[src]

send Tx request to validator

pub async fn sell_asset<'_, '_, '_, '_>(
    &'_ self,
    config: &'_ Config,
    seller_id: &'_ str,
    payload: &'_ Tx
)
[src]

send Tx request to validator

pub async fn get_chain<'_, '_, '_>(
    &'_ self,
    config: &'_ Config,
    peer_id: &'_ str
) -> Vec<Block>
[src]

Get chain dump

pub async fn peer_dump<'_, '_>(&'_ self, config: &'_ Config) -> Vec<Peer>[src]

gets list of peers from auditor, should be called periodically

pub async fn get_peer_assets<'_, '_, '_>(
    &'_ self,
    config: &'_ Config,
    peer: &'_ Peer
)
[src]

gets asset ledger from auditor node, should be called periodically

Trait Implementations

impl Clone for Client[src]

impl Default for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl !Send for Client

impl !Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,