Struct solana_client::tpu_client::TpuClient
source · [−]pub struct TpuClient { /* private fields */ }
Expand description
Client which sends transactions directly to the current leader’s TPU port over UDP. The client uses RPC to determine the current leader and fetch node contact info
Implementations
sourceimpl TpuClient
impl TpuClient
sourcepub fn send_transaction(&self, transaction: &Transaction) -> bool
pub fn send_transaction(&self, transaction: &Transaction) -> bool
Serialize and send transaction to the current and upcoming leader TPUs according to fanout size
sourcepub fn send_wire_transaction(&self, wire_transaction: &[u8]) -> bool
pub fn send_wire_transaction(&self, wire_transaction: &[u8]) -> bool
Send a wire transaction to the current and upcoming leader TPUs according to fanout size
sourcepub fn new(
rpc_client: Arc<RpcClient>,
websocket_url: &str,
config: TpuClientConfig
) -> Result<Self, TpuSenderError>
pub fn new(
rpc_client: Arc<RpcClient>,
websocket_url: &str,
config: TpuClientConfig
) -> Result<Self, TpuSenderError>
Create a new client that disconnects when dropped
pub fn send_and_confirm_messages_with_spinner<T: Signers>(
&self,
messages: &[Message],
signers: &T
) -> Result<Vec<Option<TransactionError>>, TpuSenderError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TpuClient
impl Send for TpuClient
impl Sync for TpuClient
impl Unpin for TpuClient
impl !UnwindSafe for TpuClient
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more