pub struct TestMergePool {
pub label: String,
pub pool: AccountRef<MergePool>,
pub primary_mint: AccountRef<Mint>,
pub replica_mint: AccountRef<Mint>,
}Expand description
Helper for managing a merge pool with type-safe account references
Fields§
§label: String§pool: AccountRef<MergePool>§primary_mint: AccountRef<Mint>§replica_mint: AccountRef<Mint>Implementations§
Source§impl TestMergePool
impl TestMergePool
Sourcepub fn new(
env: &mut TestSVM,
label: &str,
primary_mint: AccountRef<Mint>,
) -> Result<Self>
pub fn new( env: &mut TestSVM, label: &str, primary_mint: AccountRef<Mint>, ) -> Result<Self>
Create and set up a new merge pool
Sourcepub fn create_merge_miner(
&self,
env: &mut TestSVM,
label: &str,
owner: Pubkey,
) -> Result<TestMergeMiner>
pub fn create_merge_miner( &self, env: &mut TestSVM, label: &str, owner: Pubkey, ) -> Result<TestMergeMiner>
Create a merge miner for this merge pool with the specified owner
Sourcepub fn setup_staking_accounts(
&self,
env: &mut TestSVM,
merge_miner: &AccountRef<MergeMiner>,
primary_quarry: &Pubkey,
) -> Result<()>
pub fn setup_staking_accounts( &self, env: &mut TestSVM, merge_miner: &AccountRef<MergeMiner>, primary_quarry: &Pubkey, ) -> Result<()>
Create necessary token accounts for staking operations
Auto Trait Implementations§
impl Freeze for TestMergePool
impl RefUnwindSafe for TestMergePool
impl Send for TestMergePool
impl Sync for TestMergePool
impl Unpin for TestMergePool
impl UnwindSafe for TestMergePool
Blanket Implementations§
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> 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