fn new_update_manifest(
    rpc_client: &RpcClient,
    from_keypair: &Keypair,
    update_manifest_keypair: &Keypair,
) -> Result<(), Box<dyn std::error::Error>> {
    if rpc_client
        .get_account_data(&update_manifest_keypair.pubkey())
        .is_err()
    {
        let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;

        let new_account = config_instruction::create_account::<SignedUpdateManifest>(
            &from_keypair.pubkey(),
            &update_manifest_keypair.pubkey(),
            1, // difs
        );
        let mut transaction = Transaction::new_unsigned_instructions(vec![new_account]);
        transaction.sign(&[from_keypair], recent_blockhash);

        rpc_client.send_and_confirm_transaction(&mut transaction, &[from_keypair])?;
    }
    Ok(())
}
/// Create an empty update manifest for the given `update_manifest_keypair` if it doesn't already
/// exist on the cluster
Create an empty update manifest for the given `update_manifest_keypair` if it doesn't already
exist on the cluster
Create an empty update manifest for the given ` update_manifest_keypair ` if it doesn ' t already exist on the cluster
fn new_update_manifest(
    rpc_client: &RpcClient,
    from_keypair: &Keypair,
    update_manifest_keypair: &Keypair,
) -> Result<(), Box<dyn std::error::Error>> {
    if rpc_client
        .get_account_data(&update_manifest_keypair.pubkey())
        .is_err()
    {
        let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
        let new_account = config_instruction::create_account::<SignedUpdateManifest>(
            &from_keypair.pubkey(),
            &update_manifest_keypair.pubkey(),
            1, // difs
        );
        let mut transaction = Transaction::new_unsigned_instructions(vec![new_account]);
        transaction.sign(&[from_keypair], recent_blockhash);
        rpc_client.send_and_confirm_transaction(&mut transaction, &[from_keypair])?;
    }
    Ok(())
}
fn new_update_manifest ( rpc_client : & RpcClient , from_keypair : & Keypair , update_manifest_keypair : & Keypair , ) -> Result < ( ) , Box < dyn std :: error :: Error > > { if rpc_client . get_account_data ( & update_manifest_keypair . pubkey ( ) ) . is_err ( ) { let ( recent_blockhash , _fee_calculator ) = rpc_client . get_recent_blockhash ( ) ? ; let new_account = config_instruction :: create_account :: < SignedUpdateManifest > ( & from_keypair . pubkey ( ) , & update_manifest_keypair . pubkey ( ) , 1 , // difs ) ; let mut transaction = Transaction :: new_unsigned_instructions ( vec ! [ new_account ] ) ; transaction . sign ( & [ from_keypair ] , recent_blockhash ) ; rpc_client . send_and_confirm_transaction ( & mut transaction , & [ from_keypair ] ) ? ; } Ok ( ( ) ) }
Create an empty update manifest for the given `update_manifest_keypair` if it doesn't already
exist on the cluster
Create an empty update manifest for the given ` update_manifest_keypair ` if it doesn ' t already exist on the cluster
rpc_client
&RpcClient
from_keypair
&Keypair
update_manifest_keypair
&Keypair
rpc_client
&RpcClient
from_keypair
&Keypair
update_manifest_keypair
&Keypair