Skip to content

Commit 51df2e4

Browse files
remove rpc call
1 parent dbbd79a commit 51df2e4

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

pallets/subtensor/rpc/src/lib.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ pub trait SubtensorCustomApi<BlockHash> {
4141
fn get_neurons(&self, netuid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>;
4242
#[method(name = "neuronInfo_getNeuron")]
4343
fn get_neuron(&self, netuid: u16, uid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>;
44-
#[method(name = "neuronInfo_getNeuronCertificate")]
45-
fn get_neuron_certificate(
46-
&self,
47-
netuid: u16,
48-
uid: u16,
49-
at: Option<BlockHash>,
50-
) -> RpcResult<Vec<u8>>;
5144
#[method(name = "subnetInfo_getSubnetInfo")]
5245
fn get_subnet_info(&self, netuid: u16, at: Option<BlockHash>) -> RpcResult<Vec<u8>>;
5346
#[method(name = "subnetInfo_getSubnetsInfo")]
@@ -193,20 +186,6 @@ where
193186
.map_err(|e| Error::RuntimeError(format!("Unable to get neuron info: {:?}", e)).into())
194187
}
195188

196-
fn get_neuron_certificate(
197-
&self,
198-
netuid: u16,
199-
uid: u16,
200-
at: Option<<Block as BlockT>::Hash>,
201-
) -> RpcResult<Vec<u8>> {
202-
let api = self.client.runtime_api();
203-
let at = at.unwrap_or_else(|| self.client.info().best_hash);
204-
205-
api.get_neuron_certificate(at, netuid, uid).map_err(|e| {
206-
Error::RuntimeError(format!("Unable to get neuron certificate: {:?}", e)).into()
207-
})
208-
}
209-
210189
fn get_subnet_info(
211190
&self,
212191
netuid: u16,

pallets/subtensor/runtime-api/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ sp_api::decl_runtime_apis! {
1414
pub trait NeuronInfoRuntimeApi {
1515
fn get_neurons(netuid: u16) -> Vec<u8>;
1616
fn get_neuron(netuid: u16, uid: u16) -> Vec<u8>;
17-
fn get_neuron_certificate(netuid: u16, uid: u16) -> Vec<u8>;
1817
fn get_neurons_lite(netuid: u16) -> Vec<u8>;
1918
fn get_neuron_lite(netuid: u16, uid: u16) -> Vec<u8>;
2019
}

pallets/subtensor/tests/serving.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn test_serving_ok() {
101101

102102
#[test]
103103
fn test_serving_tls_ok() {
104-
new_test_ext().execute_with(|| {
104+
new_test_ext(1).execute_with(|| {
105105
let hotkey_account_id = U256::from(1);
106106
let uid: u16 = 0;
107107
let netuid: u16 = 1;

runtime/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,10 +1390,6 @@ impl_runtime_apis! {
13901390
fn get_neuron(netuid: u16, uid: u16) -> Vec<u8> {
13911391
SubtensorModule::get_neuron(netuid, uid).map(|r| r.encode()).unwrap_or(vec![])
13921392
}
1393-
1394-
fn get_neuron_certificate(netuid: u16, uid: u16) -> Vec<u8> {
1395-
SubtensorModule::get_neuron_certificate(netuid, uid).map(|r| r.encode()).unwrap_or(vec![])
1396-
}
13971393
}
13981394

13991395
impl subtensor_custom_rpc_runtime_api::SubnetInfoRuntimeApi<Block> for Runtime {

0 commit comments

Comments
 (0)