pub trait RegistryAccount {
fn init(&mut self) -> Result<()>;
fn new_node(
&mut self,
authority: &mut Signer<'_>,
node: &mut Account<'_, Node>,
stake: &mut Account<'_, TokenAccount>,
worker: &Signer<'_>
) -> Result<()>;
fn new_snapshot(
&mut self,
snapshot: &mut Account<'_, Snapshot>
) -> Result<()>;
fn rotate_snapshot(
&mut self,
current_snapshot: Option<&mut Account<'_, Snapshot>>,
next_snapshot: &mut Account<'_, Snapshot>
) -> Result<()>;
fn lock(&mut self) -> Result<()>;
fn unlock(&mut self) -> Result<()>;
}
Expand description
RegistryAccount