Fix formatting & clippy lints.

This commit is contained in:
Kris Nuttycombe 2023-09-08 08:46:20 -06:00
parent 85156e2b7c
commit aa039819df
2 changed files with 12 additions and 8 deletions

View File

@ -434,6 +434,7 @@ impl<Cache> TestState<Cache> {
/// Invokes [`propose_shielding`] with the given arguments.
#[cfg(feature = "transparent-inputs")]
#[allow(clippy::type_complexity)]
#[allow(dead_code)]
pub(crate) fn propose_shielding<InputsT>(
&mut self,
input_selector: &InputsT,
@ -576,6 +577,7 @@ impl<Cache> TestState<Cache> {
.unwrap()
}
#[allow(dead_code)]
pub(crate) fn get_pending_change(
&self,
account: AccountId,

View File

@ -36,9 +36,8 @@ impl<P: consensus::Parameters> RusqliteMigration for Migration<P> {
type Error = WalletMigrationError;
fn up(&self, transaction: &rusqlite::Transaction) -> Result<(), Self::Error> {
transaction.execute_batch(
&format!(
"CREATE VIEW v_sapling_shard_scan_ranges AS
transaction.execute_batch(&format!(
"CREATE VIEW v_sapling_shard_scan_ranges AS
SELECT
shard.shard_index,
shard.shard_index << {} AS start_position,
@ -60,11 +59,14 @@ impl<P: consensus::Parameters> RusqliteMigration for Migration<P> {
shard.subtree_end_height IS NULL
)
)",
SAPLING_SHARD_HEIGHT,
SAPLING_SHARD_HEIGHT,
u32::from(self.params.activation_height(NetworkUpgrade::Sapling).unwrap()),
)
)?;
SAPLING_SHARD_HEIGHT,
SAPLING_SHARD_HEIGHT,
u32::from(
self.params
.activation_height(NetworkUpgrade::Sapling)
.unwrap()
),
))?;
transaction.execute_batch(&format!(
"CREATE VIEW v_sapling_shard_unscanned_ranges AS