Skip to content

Commit 618c9f3

Browse files
committed
bugfix: read blocknum from sync message
1 parent 12528f0 commit 618c9f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kryptokrauts/event-processor-node-lib",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "Wrapper for ease listening on antelope blockchain based on @blockmatic/antelope-ship-reader",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/kafka/kafka-wrapper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ class KafkaWrapper {
7979
const resetInfo = {
8080
// either it is a "regular" message or a fork event
8181
// in case it was a "regular" message, take last blocknum and increase by 1, since the last blocknum was successfully processed
82-
last_blocknum: Number(messageJSON.blocknum) + 1 || messageJSON.restart_at_block,
82+
last_blocknum:
83+
Number(messageJSON.blocknum) + 1 ||
84+
messageJSON.restart_at_block ||
85+
messageJSON.current_block,
8386
type: messageJSON.reset_type || 'restart',
8487
};
8588
logger.info(

0 commit comments

Comments
 (0)