Skip to content

Commit 32a622f

Browse files
authored
Kobe API: Retrieve only actual validator history entries (#20)
# Problem - We returned default valdiator history entry too right now # Solution - Fix to return actual validator history entry
1 parent adb2f5a commit 32a622f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ cargo build --release
287287
cargo r --bin kobe-api -- \
288288
--ip 127.0.0.1 \
289289
--port 8080 \
290-
--mongo-connection-uri "" \
290+
--mongo-connection-uri "mongodb://<username>:<password>@localhost:27017" \
291291
--mongo-db-name validators \
292292
--sentry-api-url "" \
293293
--rpc-url "https://api.testnet.solana.com"

api/src/resolvers/query_resolver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ impl QueryResolver {
842842
.arr
843843
.iter()
844844
.map(ValidatorHistoryEntryResponse::from_validator_history_entry)
845+
.filter(|history| history.epoch.ne(&u16::MAX))
845846
.collect(),
846847
};
847848

0 commit comments

Comments
 (0)