Skip to content

Commit

Permalink
Merge pull request #10 from MinterTeam/temp-fix
Browse files Browse the repository at this point in the history
New fix
  • Loading branch information
danil-lashin authored Apr 15, 2022
2 parents 3343955 + 9153818 commit 9b62272
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 9b62272

Please sign in to comment.