Skip to content

Commit

Permalink
New fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Apr 14, 2022
1 parent 3343955 commit 9153818
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions minter-connector/minter/minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ func GetLatestMinterBlockAndNonce(ctx context.Context, currentNonce uint64) cont
ctx.Logger.Debug("Scanning blocks", "from", from, "to", to, "nonce", ctx.LastEventNonce)

for _, block := range blocks.Blocks {
// temp fix for missed withdrawal
if block.Height == 10233000 {
ctx.Logger.Debug("Applying temp fix", "height", block.Height)
ctx.Logger.Debug("Found batch")

if currentNonce > 0 && currentNonce < ctx.LastEventNonce() {
ctx.SetLastCheckedMinterBlock(block.Height - 1)
ctx.Commit()
return ctx
}

ctx.SetLastEventNonce(ctx.LastEventNonce() + 1)
ctx.SetLastBatchNonce(ctx.LastBatchNonce() + 1)
}

for _, tx := range block.Transactions {
if tx.Type == uint64(transaction.TypeSend) {
data, _ := tx.Data.UnmarshalNew()
Expand Down

0 comments on commit 9153818

Please sign in to comment.