Repository: paritytech/substrate
File: bin/node/cli/src/service.rs (Rust)

Code before:
				)
				.unwrap()
				.unwrap()
				.try_into()
				.unwrap();
				let item = <DigestItem as CompatibleDigestItem>::babe_seal(signature);
				slot += 1;

				let mut params = BlockImportParams::new(BlockOrigin::File, new_header);
				params.post_digests.push(item);
				params.body = Some(new_body);
				params.insert_intermediate(
					INTERMEDIATE_KEY,
					BabeIntermediate::<Block> { epoch_descriptor },
				);
				params.fork_choice = Some(ForkChoiceStrategy::LongestChain);

				futures::executor::block_on(block_import.import_block(params, Default::default()))
					.expect("error importing test block");
			},
			|service, _| {
				let amount = 5 * CENTS;
				let to: Address = AccountPublic::from(bob.public()).into_account().into();
				let from: Address = AccountPublic::from(charlie.public()).into_account().into();
				let genesis_hash = service.client().block_hash(0).unwrap().unwrap();
				let best_block_hash = service.client().chain_info().best_hash;
				let (spec_version, transaction_version) = {
					let version = service.client().runtime_version_at(best_block_hash).unwrap();
					(version.spec_version, version.transaction_version)
				};
				let signer = charlie.clone();

				let function = RuntimeCall::Balances(BalancesCall::transfer {
					dest: to.into(),
					value: amount,
				});

				let check_non_zero_sender = frame_system::CheckNonZeroSender::new();
				let check_spec_version = frame_system::CheckSpecVersion::new();
				let check_tx_version = frame_system::CheckTxVersion::new();
				let check_genesis = frame_system::CheckGenesis::new();
				let check_era = frame_system::CheckEra::from(Era::Immortal);
				let check_nonce = frame_system::CheckNonce::from(index);
				let check_weight = frame_system::CheckWeight::new();
				let tx_payment = pallet_asset_tx_payment::ChargeAssetTxPayment::from(0, None);
				let extra = (
					check_non_zero_sender,
					check_spec_version,
					check_tx_version,
					check_genesis,
					check_era,

Review comment (suggestion):
```suggestion
				let best_hash = service.client().chain_info().best_hash;
```

Code after:
				)
				.unwrap()
				.unwrap()
				.try_into()
				.unwrap();
				let item = <DigestItem as CompatibleDigestItem>::babe_seal(signature);
				slot += 1;

				let mut params = BlockImportParams::new(BlockOrigin::File, new_header);
				params.post_digests.push(item);
				params.body = Some(new_body);
				params.insert_intermediate(
					INTERMEDIATE_KEY,
					BabeIntermediate::<Block> { epoch_descriptor },
				);
				params.fork_choice = Some(ForkChoiceStrategy::LongestChain);

				futures::executor::block_on(block_import.import_block(params, Default::default()))
					.expect("error importing test block");
			},
			|service, _| {
				let amount = 5 * CENTS;
				let to: Address = AccountPublic::from(bob.public()).into_account().into();
				let from: Address = AccountPublic::from(charlie.public()).into_account().into();
				let genesis_hash = service.client().block_hash(0).unwrap().unwrap();
				let best_hash = service.client().chain_info().best_hash;
				let (spec_version, transaction_version) = {
					let version = service.client().runtime_version_at(best_hash).unwrap();
					(version.spec_version, version.transaction_version)
				};
				let signer = charlie.clone();

				let function = RuntimeCall::Balances(BalancesCall::transfer {
					dest: to.into(),
					value: amount,
				});

				let check_non_zero_sender = frame_system::CheckNonZeroSender::new();
				let check_spec_version = frame_system::CheckSpecVersion::new();
				let check_tx_version = frame_system::CheckTxVersion::new();
				let check_genesis = frame_system::CheckGenesis::new();
				let check_era = frame_system::CheckEra::from(Era::Immortal);
				let check_nonce = frame_system::CheckNonce::from(index);
				let check_weight = frame_system::CheckWeight::new();
				let tx_payment = pallet_asset_tx_payment::ChargeAssetTxPayment::from(0, None);
				let extra = (
					check_non_zero_sender,
					check_spec_version,
					check_tx_version,
					check_genesis,
					check_era,