Skip to content

Commit

Permalink
bugfix: read blocknum from sync message
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch-lbw committed Mar 22, 2024
1 parent 12528f0 commit 618c9f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kryptokrauts/event-processor-node-lib",
"version": "1.0.8",
"version": "1.0.9",
"description": "Wrapper for ease listening on antelope blockchain based on @blockmatic/antelope-ship-reader",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/kafka/kafka-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ class KafkaWrapper {
const resetInfo = {
// either it is a "regular" message or a fork event
// in case it was a "regular" message, take last blocknum and increase by 1, since the last blocknum was successfully processed
last_blocknum: Number(messageJSON.blocknum) + 1 || messageJSON.restart_at_block,
last_blocknum:
Number(messageJSON.blocknum) + 1 ||
messageJSON.restart_at_block ||
messageJSON.current_block,
type: messageJSON.reset_type || 'restart',
};
logger.info(
Expand Down

0 comments on commit 618c9f3

Please sign in to comment.