Skip to content

Commit

Permalink
Merge pull request #1025 from UniqueNetwork/feature/disable-inflation
Browse files Browse the repository at this point in the history
Disable inflation for now
  • Loading branch information
CertainLach authored Oct 24, 2023
2 parents 951758d + 37fd570 commit be55c88
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions runtime/common/config/pallets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,21 @@ impl BlockNumberProvider for OnInitializeBlockNumberProvider {
type BlockNumber = BlockNumber;

fn current_block_number() -> Self::BlockNumber {
use hex_literal::hex;
use parity_scale_codec::Decode;
use sp_io::storage;
// TODO: Replace with the following code after https://github.com/paritytech/polkadot-sdk/commit/3ea497b5a0fdda252f9c5a3c257cfaf8685f02fd lands
// <cumulus_pallet_parachain_system::Pallet<Runtime>>::last_relay_block_number()

// ParachainSystem.LastRelayChainBlockNumber
let Some(encoded) = storage::get(&hex!("45323df7cc47150b3930e2666b0aa313a2bca190d36bd834cc73a38fc213ecbd")) else {
// First parachain block
return Default::default()
};
BlockNumber::decode(&mut encoded.as_ref())
.expect("typeof(RelayBlockNumber) == typeof(BlockNumber) == u32; qed")
// This code was broken previously, but after fixing, we decided it would be better to leave it broken for now.
0.into()
// use hex_literal::hex;
// use parity_scale_codec::Decode;
// use sp_io::storage;
// // TODO: Replace with the following code after https://github.com/paritytech/polkadot-sdk/commit/3ea497b5a0fdda252f9c5a3c257cfaf8685f02fd lands
// // <cumulus_pallet_parachain_system::Pallet<Runtime>>::last_relay_block_number()
//
// // ParachainSystem.LastRelayChainBlockNumber
// let Some(encoded) = storage::get(&hex!("45323df7cc47150b3930e2666b0aa313a2bca190d36bd834cc73a38fc213ecbd")) else {
// // First parachain block
// return Default::default()
// };
// BlockNumber::decode(&mut encoded.as_ref())
// .expect("typeof(RelayBlockNumber) == typeof(BlockNumber) == u32; qed")
}
}

Expand Down

0 comments on commit be55c88

Please sign in to comment.