Skip to content

Commit 5e42e23

Browse files
authored
Merge pull request #107 from wcatz/fix/live-tail-pool-match
fix(live): hash issuerVkey before pool ID comparison
2 parents 134e0a6 + 4584b95 commit 5e42e23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ func (i *Indexer) handleRollForward(ctx chainsync.CallbackContext, blockType uin
860860
blockNumber := header.BlockNumber()
861861
issuerVkeyBytes := header.IssuerVkey()
862862
issuerVkey := hex.EncodeToString(issuerVkeyBytes[:])
863+
issuerPoolId := ledger.NewBlake2b224(issuerVkeyBytes[:]).String()
863864
bodySize := header.BlockBodySize()
864865

865866
// Extract VRF output (reuses extractVrfFromHeader in sync.go)
@@ -919,7 +920,7 @@ func (i *Indexer) handleRollForward(ctx chainsync.CallbackContext, blockType uin
919920
}
920921

921922
// If the block is from our pool, fetch full block for tx count and send notifications
922-
if issuerVkey == i.poolId {
923+
if issuerPoolId == i.poolId {
923924
i.epochBlocks++
924925
i.totalBlocks++
925926

0 commit comments

Comments
 (0)