Skip to content

Commit 3146dbb

Browse files
authored
Merge pull request #2097 from opentensor/always-include-netuid
always include the netuid in selective metagraph
2 parents 8341630 + e7b0798 commit 3146dbb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pallets/subtensor/src/rpc_info/metagraph.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,14 @@ impl<T: Config> Pallet<T> {
869869
None
870870
} else {
871871
let mut result = SelectiveMetagraph::default();
872+
872873
for index in metagraph_indexes.iter() {
873874
let value = Self::get_single_selective_mechagraph(netuid, mecid, *index);
874875
result.merge_value(&value, *index as usize);
875876
}
877+
// always include netuid even the metagraph_indexes doesn't contain it
878+
result.netuid = netuid.into();
879+
876880
Some(result)
877881
}
878882
}

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
223223
// `spec_version`, and `authoring_version` are the same between Wasm and native.
224224
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
225225
// the compatible custom types.
226-
spec_version: 324,
226+
spec_version: 325,
227227
impl_version: 1,
228228
apis: RUNTIME_API_VERSIONS,
229229
transaction_version: 1,

0 commit comments

Comments
 (0)