pub struct Link {
pub link: [u8; 64],
pub block_time: u64,
pub slot: u64,
pub index: u64,
pub atomic_instruction_index: u8,
}Expand description
Struct used to track a “link” between two accounts. For there to be a link, both accounts must be on curve. We return link as a 64 byte array with first 32 bytes being “smaller” account and last 32 bytes being “larger” account. Accounts are compared from most to least significant bit. In addition to storing the 2 wallets, we also store the earliest tx where they were first observed linking, and we order by block_time, slot, index, and atomic_instruction_index.
Fields§
§link: [u8; 64]§block_time: u64§slot: u64§index: u64§atomic_instruction_index: u8Implementations§
Source§impl Link
impl Link
Sourcepub fn check_link(
account1: &Pubkey,
account2: &Pubkey,
block_time: u64,
slot: u64,
index: u64,
atomic_instruction_index: u8,
) -> Option<Self>
pub fn check_link( account1: &Pubkey, account2: &Pubkey, block_time: u64, slot: u64, index: u64, atomic_instruction_index: u8, ) -> Option<Self>
Constructor to check if there exists a “link” between two accounts. For there to be a link, both accounts must be on curve. Returns an option where if its not none, the link is valid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more