Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Jul 29, 2024
1 parent a7d4ac3 commit 6f03ee8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions core/lib/object_store/src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl dyn ObjectStore + '_ {
pub async fn get<V: StoredObject>(&self, key: V::Key<'_>) -> Result<V, ObjectStoreError> {
let key = V::encode_key(key);
// Record the key for tracing.
tracing::Span::current().record("key", &key.as_str());
tracing::Span::current().record("key", key.as_str());
let bytes = self.get_raw(V::BUCKET, &key).await?;
V::deserialize(bytes).map_err(ObjectStoreError::Serialization)
}
Expand Down Expand Up @@ -178,7 +178,7 @@ impl dyn ObjectStore + '_ {
) -> Result<String, ObjectStoreError> {
let key = V::encode_key(key);
// Record the key for tracing.
tracing::Span::current().record("key", &key.as_str());
tracing::Span::current().record("key", key.as_str());
let bytes = value.serialize().map_err(ObjectStoreError::Serialization)?;
self.put_raw(V::BUCKET, &key, bytes).await?;
Ok(key)
Expand All @@ -197,7 +197,7 @@ impl dyn ObjectStore + '_ {
pub async fn remove<V: StoredObject>(&self, key: V::Key<'_>) -> Result<(), ObjectStoreError> {
let key = V::encode_key(key);
// Record the key for tracing.
tracing::Span::current().record("key", &key.as_str());
tracing::Span::current().record("key", key.as_str());
self.remove_raw(V::BUCKET, &key).await
}

Expand Down
13 changes: 5 additions & 8 deletions infrastructure/zk/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ type InitSetupOptions = {
skipSubmodulesCheckout: boolean;
runObservability: boolean;
deploymentMode: DeploymentMode;
shouldCheckPostgres: boolean; // Whether to perform `cargo sqlx prepare --check`
};
const initSetup = async ({
skipSubmodulesCheckout,
skipEnvSetup,
runObservability,
deploymentMode,
shouldCheckPostgres
deploymentMode
}: InitSetupOptions): Promise<void> => {
await announced(
`Initializing in ${deploymentMode == contract.DeploymentMode.Validium ? 'Validium mode' : 'Roll-up mode'}`
Expand Down Expand Up @@ -147,6 +145,7 @@ type InitDevCmdActionOptions = InitSetupOptions & {
baseTokenName?: string;
validiumMode?: boolean;
localLegacyBridgeTesting?: boolean;
shouldCheckPostgres: boolean; // Whether to perform `cargo sqlx prepare --check`
};
export const initDevCmdAction = async ({
skipEnvSetup,
Expand All @@ -168,8 +167,7 @@ export const initDevCmdAction = async ({
skipEnvSetup,
skipSubmodulesCheckout,
runObservability,
deploymentMode,
shouldCheckPostgres
deploymentMode
});
if (!skipVerifier) {
await deployVerifier();
Expand All @@ -178,7 +176,7 @@ export const initDevCmdAction = async ({
await deployTestTokens(testTokenOptions);
}
await initBridgehubStateTransition();
await initDatabase();
await initDatabase(shouldCheckPostgres);
await initHyperchain({
includePaymaster: true,
baseTokenName,
Expand Down Expand Up @@ -232,8 +230,7 @@ export const initHyperCmdAction = async ({
skipEnvSetup: false,
skipSubmodulesCheckout: false,
runObservability,
deploymentMode,
shouldCheckPostgres: true
deploymentMode
});
}
await initDatabase();
Expand Down

0 comments on commit 6f03ee8

Please sign in to comment.