Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable inflation for now #1025

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading