fn store_update_manifest(
    rpc_client: &RpcClient,
    from_keypair: &Keypair,
    update_manifest_keypair: &Keypair,
    update_manifest: &SignedUpdateManifest,
) -> Result<(), Box<dyn std::error::Error>> {
    let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;

    let signers = [from_keypair, update_manifest_keypair];
    let instruction = config_instruction::store::<SignedUpdateManifest>(
        &update_manifest_keypair.pubkey(),
        update_manifest,
    );

    let message = Message::new_with_payer(vec![instruction], Some(&from_keypair.pubkey()));
    let mut transaction = Transaction::new(&signers, message, recent_blockhash);
    rpc_client.send_and_confirm_transaction(&mut transaction, &[from_keypair])?;
    Ok(())
}
/// Update the update manifest on the cluster with new content
Update the update manifest on the cluster with new content
Update the update manifest on the cluster with new content
fn store_update_manifest(
    rpc_client: &RpcClient,
    from_keypair: &Keypair,
    update_manifest_keypair: &Keypair,
    update_manifest: &SignedUpdateManifest,
) -> Result<(), Box<dyn std::error::Error>> {
    let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
    let signers = [from_keypair, update_manifest_keypair];
    let instruction = config_instruction::store::<SignedUpdateManifest>(
        &update_manifest_keypair.pubkey(),
        update_manifest,
    );
    let message = Message::new_with_payer(vec![instruction], Some(&from_keypair.pubkey()));
    let mut transaction = Transaction::new(&signers, message, recent_blockhash);
    rpc_client.send_and_confirm_transaction(&mut transaction, &[from_keypair])?;
    Ok(())
}
fn store_update_manifest ( rpc_client : & RpcClient , from_keypair : & Keypair , update_manifest_keypair : & Keypair , update_manifest : & SignedUpdateManifest , ) -> Result < ( ) , Box < dyn std :: error :: Error > > { let ( recent_blockhash , _fee_calculator ) = rpc_client . get_recent_blockhash ( ) ? ; let signers = [ from_keypair , update_manifest_keypair ] ; let instruction = config_instruction :: store :: < SignedUpdateManifest > ( & update_manifest_keypair . pubkey ( ) , update_manifest , ) ; let message = Message :: new_with_payer ( vec ! [ instruction ] , Some ( & from_keypair . pubkey ( ) ) ) ; let mut transaction = Transaction :: new ( & signers , message , recent_blockhash ) ; rpc_client . send_and_confirm_transaction ( & mut transaction , & [ from_keypair ] ) ? ; Ok ( ( ) ) }
Update the update manifest on the cluster with new content
Update the update manifest on the cluster with new content
rpc_client
&RpcClient
from_keypair
&Keypair
update_manifest_keypair
&Keypair
update_manifest
&SignedUpdateManifest
rpc_client
&RpcClient
from_keypair
&Keypair
update_manifest_keypair
&Keypair
update_manifest
&SignedUpdateManifest