Skip to content

Commit

Permalink
[bin] check fix psql loading type (#145)
Browse files Browse the repository at this point in the history
* revert: [check][investigation] check what is wrong with docker run

* [bin] check cli fixing psql row conversion

* [bin] check cli fixing psql row conversion: adjustment
  • Loading branch information
ochaloup authored Sep 30, 2024
1 parent e13a460 commit fad3193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 4 additions & 1 deletion check/src/validators_mev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ pub async fn check_mev(psql_client: &Client, rpc_client: &RpcClient) -> anyhow::

match rows.iter().next() {
Some(row) => {
let sql_epoch: Decimal = row.get("epoch");
// PostgreSQL type 'INTEGER'
let sql_epoch: i32 = row.get("epoch");
let sql_epoch: Decimal = Decimal::from(sql_epoch);
// PostgreSQL type 'NUMERIC'
let sql_slot: Decimal = row.get("epoch_slot");

let epoch_data = rpc_client.get_epoch_info()?;
Expand Down
6 changes: 0 additions & 6 deletions scripts/check-validators-mev.bash
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#!/bin/bash

set -e
set -x

pwd
ls -alrth

SCRIPT_DIR=$(dirname "$0")
BIN_DIR="${BIN_DIR:-"$SCRIPT_DIR/../target/debug"}"

ls -alrth "$BIN_DIR"

if [[ -z $RPC_URL ]]
then
echo "Env variable RPC_URL is missing!" >&2
Expand Down

0 comments on commit fad3193

Please sign in to comment.