Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ paths:
]
timestamp:
type: number
last_processed_block_height:
type: number
/api/v1/chain/history:
get:
summary: Get a paginated list of transaction for a list of addresses
Expand Down
1 change: 1 addition & 0 deletions webserver/src/handler/crawler_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub async fn get_crawlers_timestamps(
|| CrawlersTimestamps {
name: variant.to_string(),
timestamp: 0,
last_processed_block_height: 1,
},
|ct| ct.clone(),
)
Expand Down
1 change: 1 addition & 0 deletions webserver/src/response/crawler_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ use serde::{Deserialize, Serialize};
pub struct CrawlersTimestamps {
pub name: String,
pub timestamp: i64,
pub last_processed_block_height: i32,
}
3 changes: 3 additions & 0 deletions webserver/src/service/crawler_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ impl CrawlerStateService {
.map(|crawler| CrawlersTimestamps {
name: crawler.name.to_string(),
timestamp: crawler.timestamp.and_utc().timestamp(),
last_processed_block_height: crawler
.last_processed_block
.unwrap_or(1),
})
.collect::<Vec<CrawlersTimestamps>>()
})
Expand Down
Loading