-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #701 from blockscout/lymarenkolev/bens/add-domain-…
…name-fixer [BENS] Add domain name fixer and fix proto
- Loading branch information
Showing
12 changed files
with
249 additions
and
82 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
blockscout-ens/bens-logic/src/subgraphs_reader/domain_name.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use super::sql; | ||
use sqlx::PgPool; | ||
use std::sync::Arc; | ||
|
||
pub async fn fix_domain_name(pool: Arc<PgPool>, schema: &str, domain_name: &str, domain_id: &str) { | ||
match sql::update_domain_name(pool.as_ref(), schema, domain_id, domain_name).await { | ||
Ok(r) => { | ||
tracing::info!( | ||
rows_affected = r.rows_affected(), | ||
name = domain_name, | ||
"successfuly updated domain name" | ||
); | ||
} | ||
Err(err) => tracing::error!(name = domain_name, "cannot update domain name: {err}"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod blockscout; | ||
mod domain_name; | ||
mod reader; | ||
mod schema_selector; | ||
mod sql; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.