diff --git a/pallets/subnet_emission/src/decryption.rs b/pallets/subnet_emission/src/decryption.rs index 464625ff..5a9c43bf 100644 --- a/pallets/subnet_emission/src/decryption.rs +++ b/pallets/subnet_emission/src/decryption.rs @@ -208,9 +208,7 @@ impl Pallet { netuid: u16, weights: Vec, ) -> Result { - weights.into_iter().fold(Ok(0u64), |acc_emission, (block, block_weights)| { - let acc_emission = acc_emission?; - + weights.into_iter().try_fold(0u64, |acc_emission, (block, block_weights)| { // Update weights storage for (uid, weights) in block_weights.clone() { Weights::::set(netuid, uid, Some(weights)); diff --git a/pallets/subnet_emission/src/subnet_consensus/util/consensus.rs b/pallets/subnet_emission/src/subnet_consensus/util/consensus.rs index e3ca1030..c2409f80 100644 --- a/pallets/subnet_emission/src/subnet_consensus/util/consensus.rs +++ b/pallets/subnet_emission/src/subnet_consensus/util/consensus.rs @@ -804,7 +804,6 @@ pub struct ConsensusOutput { pub total_emitted: u64, } -// TODO: write a test on this impl ConsensusOutput { pub fn apply(self) { use pallet_subspace::*;