diff --git a/pallets/subtensor/rpc/src/lib.rs b/pallets/subtensor/rpc/src/lib.rs index ebf7dcc35..d99388193 100644 --- a/pallets/subtensor/rpc/src/lib.rs +++ b/pallets/subtensor/rpc/src/lib.rs @@ -41,13 +41,6 @@ pub trait SubtensorCustomApi<BlockHash> { fn get_neurons(&self, netuid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>; #[method(name = "neuronInfo_getNeuron")] fn get_neuron(&self, netuid: u16, uid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>; - #[method(name = "neuronInfo_getNeuronCertificate")] - fn get_neuron_certificate( - &self, - netuid: u16, - uid: u16, - at: Option<BlockHash>, - ) -> RpcResult<Vec<u8>>; #[method(name = "subnetInfo_getSubnetInfo")] fn get_subnet_info(&self, netuid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>; #[method(name = "subnetInfo_getSubnetsInfo")] @@ -193,20 +186,6 @@ where .map_err(|e| Error::RuntimeError(format!("Unable to get neuron info: {:?}", e)).into()) } - fn get_neuron_certificate( - &self, - netuid: u16, - uid: u16, - at: Option<<Block as BlockT>::Hash>, - ) -> RpcResult<Vec<u8>> { - let api = self.client.runtime_api(); - let at = at.unwrap_or_else(|| self.client.info().best_hash); - - api.get_neuron_certificate(at, netuid, uid).map_err(|e| { - Error::RuntimeError(format!("Unable to get neuron certificate: {:?}", e)).into() - }) - } - fn get_subnet_info( &self, netuid: u16, diff --git a/pallets/subtensor/runtime-api/src/lib.rs b/pallets/subtensor/runtime-api/src/lib.rs index d2b6ca1fd..ca43384b8 100644 --- a/pallets/subtensor/runtime-api/src/lib.rs +++ b/pallets/subtensor/runtime-api/src/lib.rs @@ -14,7 +14,6 @@ sp_api::decl_runtime_apis! { pub trait NeuronInfoRuntimeApi { fn get_neurons(netuid: u16) -> Vec<u8>; fn get_neuron(netuid: u16, uid: u16) -> Vec<u8>; - fn get_neuron_certificate(netuid: u16, uid: u16) -> Vec<u8>; fn get_neurons_lite(netuid: u16) -> Vec<u8>; fn get_neuron_lite(netuid: u16, uid: u16) -> Vec<u8>; } diff --git a/pallets/subtensor/tests/serving.rs b/pallets/subtensor/tests/serving.rs index b2d3b4e55..a6a26a690 100644 --- a/pallets/subtensor/tests/serving.rs +++ b/pallets/subtensor/tests/serving.rs @@ -101,7 +101,7 @@ fn test_serving_ok() { #[test] fn test_serving_tls_ok() { - new_test_ext().execute_with(|| { + new_test_ext(1).execute_with(|| { let hotkey_account_id = U256::from(1); let uid: u16 = 0; let netuid: u16 = 1; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 186d95911..d41a82186 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1390,10 +1390,6 @@ impl_runtime_apis! { fn get_neuron(netuid: u16, uid: u16) -> Vec<u8> { SubtensorModule::get_neuron(netuid, uid).map(|r| r.encode()).unwrap_or(vec![]) } - - fn get_neuron_certificate(netuid: u16, uid: u16) -> Vec<u8> { - SubtensorModule::get_neuron_certificate(netuid, uid).map(|r| r.encode()).unwrap_or(vec![]) - } } impl subtensor_custom_rpc_runtime_api::SubnetInfoRuntimeApi<Block> for Runtime {