Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: panic in process methods #48

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

gusin13
Copy link
Collaborator

@gusin13 gusin13 commented Nov 14, 2024

Noticed errors in process method

"level":"debug","stakingTxHashHex":"3a0e302b928558ae2830a6f3b8179e8f7762d6681f4a5a377ee184410da4af52","currentState":"VERIFIED","time":"2024-11-14T16:07:05Z","message":"Ignoring EventBTCDelgationUnbondedEarly because current state is not qualified for transition"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x276936e]

goroutine 1 [running]:
github.com/babylonlabs-io/babylon-staking-indexer/internal/services.(*Service).processBTCDelegationUnbondedEarlyEvent(0xc001348080, {0x38bb690, 0x550ca60}, {{0xc001c81400, 0x34}, {0xc002cdf220, 0x4, 0x4}})
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/internal/services/delegation.go:170 +0x6e
github.com/babylonlabs-io/babylon-staking-indexer/internal/services.(*Service).processEvent(0xc001348080, {0x38bb690, 0x550ca60}, {{0x2f1dcf6, 0x2}, {{0xc001c81400, 0x34}, {0xc002cdf220, 0x4, 0x4}}})
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/internal/services/events.go:70 +0x33b
github.com/babylonlabs-io/babylon-staking-indexer/internal/services.(*Service).processBlocksSequentially(0xc001348080, {0x38bb690, 0x550ca60})
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/internal/services/bootstrap.go:79 +0x54c
github.com/babylonlabs-io/babylon-staking-indexer/internal/services.(*Service).StartBbnBlockProcessor(0xc001348080?, {0x38bb690?, 0x550ca60?})
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/internal/services/bootstrap.go:22 +0x1d
github.com/babylonlabs-io/babylon-staking-indexer/internal/services.(*Service).StartIndexerSync(0xc001348080, {0x38bb690, 0x550ca60})
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/internal/services/service.go:70 +0x10d
main.main()
	/go/src/github.com/babylonlabs-io/babylon-staking-indexer/cmd/babylon-staking-indexer/main.go:76 +0x528

@gusin13 gusin13 marked this pull request as ready for review November 14, 2024 16:38
@jrwbabylonlab jrwbabylonlab merged commit ea561a3 into main Nov 14, 2024
11 checks passed
@jrwbabylonlab jrwbabylonlab deleted the fix/panic-process-events branch November 14, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants