Skip to content

Commit

Permalink
Fix Comments (#878)
Browse files Browse the repository at this point in the history
## Describe your changes
Update Transaction Payment - signed extra

## Checklist before requesting a review
- [x] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [x] I removed all Clippy and Formatting Warnings. 
- [x] I added required Copyrights.
  • Loading branch information
Gauthamastro authored Nov 1, 2023
2 parents db5fd2c + 047bed5 commit 0987b16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion nodes/mainnet/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ pub fn run() -> Result<()> {
)
}

//TODO: @Gautham - Check this
cmd.run::<Block, sp_statement_store::runtime_api::HostFunctions>(config)
},
BenchmarkCmd::Block(cmd) => {
Expand Down
5 changes: 3 additions & 2 deletions nodes/mainnet/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ pub fn create_extrinsic(
let tip = 0;
let extra: node_polkadex_runtime::SignedExtra =
(
//TODO: Why it is commented?
//frame_system::CheckNonZeroSender::<node_polkadex_runtime::Runtime>::new(),
frame_system::CheckNonZeroSender::<node_polkadex_runtime::Runtime>::new(),
frame_system::CheckSpecVersion::<node_polkadex_runtime::Runtime>::new(),
frame_system::CheckTxVersion::<node_polkadex_runtime::Runtime>::new(),
frame_system::CheckGenesis::<node_polkadex_runtime::Runtime>::new(),
Expand All @@ -114,6 +113,7 @@ pub fn create_extrinsic(
function.clone(),
extra.clone(),
(
(),
node_polkadex_runtime::VERSION.spec_version,
node_polkadex_runtime::VERSION.transaction_version,
genesis_hash,
Expand Down Expand Up @@ -851,6 +851,7 @@ mod tests {
function.clone(),
extra.clone(),
(
(),
node_polkadex_runtime::VERSION.spec_version,
node_polkadex_runtime::VERSION.transaction_version,
genesis_hash,
Expand Down
12 changes: 6 additions & 6 deletions runtimes/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ impl pallet_staking::Config for Runtime {
// This a placeholder, to be introduced in the next PR as an instance of bags-list
type TargetList = pallet_staking::UseValidatorsMap<Self>;
type MaxUnlockingChunks = ConstU32<32>;
type EventListeners = (); //TODO: Should we update this?
type EventListeners = ();
type BenchmarkingConfig = StakingBenchmarkingConfig;
type WeightInfo = pallet_staking::weights::SubstrateWeight<Runtime>;
}
Expand Down Expand Up @@ -1051,10 +1051,11 @@ where
// so the actual block number is `n`.
.saturating_sub(1);
let extra = (
frame_system::CheckNonZeroSender::<Runtime>::new(),
frame_system::CheckSpecVersion::<Runtime>::new(),
frame_system::CheckTxVersion::<Runtime>::new(),
frame_system::CheckGenesis::<Runtime>::new(),
frame_system::CheckMortality::<Runtime>::from(generic::Era::mortal(
frame_system::CheckEra::<Runtime>::from(generic::Era::mortal(
period,
current_block,
)),
Expand Down Expand Up @@ -1574,17 +1575,16 @@ pub type BlockId = generic::BlockId<Block>;
///
/// [`sign`]: <../../testing/src/keyring.rs.html>
pub type SignedExtra = (
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_asset_conversion_tx_payment::ChargeAssetTxPayment<Runtime>,
);
//TODO: two things are missing?
// frame_system::CheckNonZeroSender<Runtime>,
// frame_system::CheckEra<Runtime>,

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
Expand Down

0 comments on commit 0987b16

Please sign in to comment.