Skip to content

Commit 4e4addd

Browse files
authored
Merge pull request #2176 from opentensor/fix/revert-tao-flow-back-to-prices
Revert to EMA prices for emissions
2 parents ccad010 + 6b8440c commit 4e4addd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pallets/subtensor/src/coinbase/subnet_emissions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ impl<T: Config> Pallet<T> {
214214
offset_flows
215215
}
216216

217+
// Combines ema price method and tao flow method linearly over FlowHalfLife blocks
218+
pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap<NetUid, U64F64> {
219+
// Self::get_shares_flow(subnets_to_emit_to)
220+
Self::get_shares_price_ema(subnets_to_emit_to)
221+
}
222+
217223
// DEPRECATED: Implementation of shares that uses EMA prices will be gradually deprecated
218224
fn get_shares_price_ema(subnets_to_emit_to: &[NetUid]) -> BTreeMap<NetUid, U64F64> {
219225
// Get sum of alpha moving prices
@@ -241,10 +247,4 @@ impl<T: Config> Pallet<T> {
241247
})
242248
.collect::<BTreeMap<NetUid, U64F64>>()
243249
}
244-
245-
// Combines ema price method and tao flow method linearly over FlowHalfLife blocks
246-
pub(crate) fn get_shares(subnets_to_emit_to: &[NetUid]) -> BTreeMap<NetUid, U64F64> {
247-
// Self::get_shares_flow(subnets_to_emit_to)
248-
Self::get_shares_price_ema(subnets_to_emit_to)
249-
}
250250
}

runtime/src/lib.rs

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

0 commit comments

Comments
 (0)