async fn reinvoke_bindings(
    key: &KeyPair,
    target: Recipient<Invocation>,
    provider_id: &str,
    contract_id: &str,
    binding: &str,
    existing_bindings: Vec<(String, HashMap<String, String>)>,
) {
    for (actor, vals) in existing_bindings.iter() {
        trace!("Re-invoking bind_actor {}->{}", actor, provider_id);
        let config = crate::generated::core::CapabilityConfiguration {
            module: actor.to_string(),
            values: vals.clone(),
        };
        let inv = Invocation::new(
            key,
            WasccEntity::Actor(SYSTEM_ACTOR.to_string()),
            WasccEntity::Capability {
                id: provider_id.to_string(),
                contract_id: contract_id.to_string(),
                binding: binding.to_string(),
            },
            OP_BIND_ACTOR,
            crate::generated::core::serialize(&config).unwrap(),
        );
        if let Err(_e) = target.clone().send(inv).await {
            error!(
                "Mailbox failure sending binding re-invoke for {} -> {}",
                actor, provider_id
            );
        }
    }
}
// Examine the bindings cache for anything that applies to this specific provider and, if so, generate a binding
// invocation for it and send it to the provider
Examine the bindings cache for anything that applies to this specific provider and, if so, generate a binding
invocation for it and send it to the provider
Examine the bindings cache for anything that applies to this specific provider and if so generate a binding invocation for it and send it to the provider
async fn reinvoke_bindings(
    key: &KeyPair,
    target: Recipient<Invocation>,
    provider_id: &str,
    contract_id: &str,
    binding: &str,
    existing_bindings: Vec<(String, HashMap<String, String>)>,
) {
    for (actor, vals) in existing_bindings.iter() {
        trace!("Re-invoking bind_actor {}->{}", actor, provider_id);
        let config = crate::generated::core::CapabilityConfiguration {
            module: actor.to_string(),
            values: vals.clone(),
        };
        let inv = Invocation::new(
            key,
            WasccEntity::Actor(SYSTEM_ACTOR.to_string()),
            WasccEntity::Capability {
                id: provider_id.to_string(),
                contract_id: contract_id.to_string(),
                binding: binding.to_string(),
            },
            OP_BIND_ACTOR,
            crate::generated::core::serialize(&config).unwrap(),
        );
        if let Err(_e) = target.clone().send(inv).await {
            error!(
                "Mailbox failure sending binding re-invoke for {} -> {}",
                actor, provider_id
            );
        }
    }
}
async fn reinvoke_bindings ( key : & KeyPair , target : Recipient < Invocation > , provider_id : & str , contract_id : & str , binding : & str , existing_bindings : Vec < ( String , HashMap < String , String > ) > , ) { for ( actor , vals ) in existing_bindings . iter ( ) { trace ! ( " " actor provider_id ) ; let config = crate :: generated :: core :: CapabilityConfiguration { module : actor . to_string ( ) , values : vals . clone ( ) , } ; let inv = Invocation :: new ( key , WasccEntity :: Actor ( SYSTEM_ACTOR . to_string ( ) ) , WasccEntity :: Capability { id : provider_id . to_string ( ) , contract_id : contract_id . to_string ( ) , binding : binding . to_string ( ) , } , OP_BIND_ACTOR , crate :: generated :: core :: serialize ( & config ) . unwrap ( ) , ) ; if let Err ( _e ) = target . clone ( ) . send ( inv ) . await { error ! ( " " actor provider_id ) ; } } }
Examine the bindings cache for anything that applies to this specific provider and, if so, generate a binding
invocation for it and send it to the provider
Examine the bindings cache for anything that applies to this specific provider and if so generate a binding invocation for it and send it to the provider
key
&KeyPair
target
Recipient<Invocation>
provider_id
&str
contract_id
&str
binding
&str
existing_bindings
Vec<(String, HashMap<String, String>)>
key
&KeyPair
target
Recipient<Invocation>
provider_id
&str
contract_id
&str
binding
&str
existing_bindings
Vec<(String, HashMap<String, String>)>