/// Adds a node record with the given values to the given data provider.
Adds a node record with the given values to the given data provider.
Adds a node record with the given values to the given data provider .
fn add_node_record_with_node_operator_id(
    data_provider: &ProtoRegistryDataProvider,
    node_id: NodeId,
    node_ip: String,
    node_operator_id: PrincipalId,
) {
    let xnet_endpoint = ConnectionEndpoint {
        ip_addr: node_ip,
        port: 2197,
        protocol: Protocol::Http1 as i32,
    };
    data_provider
        .add(
            &make_node_record_key(node_id),
            REGISTRY_VERSION,
            Some(NodeRecord {
                xnet: Some(xnet_endpoint.clone()),
                xnet_api: vec![xnet_endpoint],
                node_operator_id: node_operator_id.to_vec(),
                ..Default::default()
            }),
        )
        .expect("Could not add node record.");
}
fn add_node_record_with_node_operator_id ( data_provider : & ProtoRegistryDataProvider , node_id : NodeId , node_ip : String , node_operator_id : PrincipalId , ) { let xnet_endpoint = ConnectionEndpoint { ip_addr : node_ip , port : 2197 , protocol : Protocol :: Http1 as i32 , } ; data_provider . add ( & make_node_record_key ( node_id ) , REGISTRY_VERSION , Some ( NodeRecord { xnet : Some ( xnet_endpoint . clone ( ) ) , xnet_api : vec ! [ xnet_endpoint ] , node_operator_id : node_operator_id . to_vec ( ) , .. Default :: default ( ) } ) , ) . expect ( " " ) ; }
Adds a node record with the given values to the given data provider.
Adds a node record with the given values to the given data provider .
data_provider
&ProtoRegistryDataProvider
node_id
NodeId
node_ip
String
node_operator_id
PrincipalId