Skip to content

Commit

Permalink
fix(hubble): rework
Browse files Browse the repository at this point in the history
  • Loading branch information
qlp committed Nov 29, 2024
1 parent 9f75c28 commit f40e13a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hubble/src/indexer/tm/fetcher_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use time::OffsetDateTime;
use tokio::task::JoinSet;
use tracing::{debug, info, info_span, trace, Instrument};

const TX_RESULT_CODE_OK: u32 = 0;

use crate::{
indexer::{
api::{
Expand Down Expand Up @@ -224,7 +226,7 @@ impl TmFetcherClient {

let pg_transactions = transactions_response
.into_iter()
.filter(|tx| tx.tx_result.code == 0) // 0 == OK
.filter(|tx| tx.tx_result.code == TX_RESULT_CODE_OK)
.map(|tx| {
let transaction_hash = tx.hash.to_string();
let data = serde_json::to_value(&tx).unwrap().replace_escape_chars();
Expand Down

0 comments on commit f40e13a

Please sign in to comment.