From 91538189e59a528f95a408fcbe937f6115bf860b Mon Sep 17 00:00:00 2001 From: Daniil Lashin Date: Thu, 14 Apr 2022 17:23:51 +0300 Subject: [PATCH] New fix --- minter-connector/minter/minter.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/minter-connector/minter/minter.go b/minter-connector/minter/minter.go index dde86a1..7f349d5 100644 --- a/minter-connector/minter/minter.go +++ b/minter-connector/minter/minter.go @@ -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()