Skip to content

Commit 9b62272

Browse files
authored
Merge pull request #10 from MinterTeam/temp-fix
New fix
2 parents 3343955 + 9153818 commit 9b62272

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

minter-connector/minter/minter.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ func GetLatestMinterBlockAndNonce(ctx context.Context, currentNonce uint64) cont
5151
ctx.Logger.Debug("Scanning blocks", "from", from, "to", to, "nonce", ctx.LastEventNonce)
5252

5353
for _, block := range blocks.Blocks {
54+
// temp fix for missed withdrawal
55+
if block.Height == 10233000 {
56+
ctx.Logger.Debug("Applying temp fix", "height", block.Height)
57+
ctx.Logger.Debug("Found batch")
58+
59+
if currentNonce > 0 && currentNonce < ctx.LastEventNonce() {
60+
ctx.SetLastCheckedMinterBlock(block.Height - 1)
61+
ctx.Commit()
62+
return ctx
63+
}
64+
65+
ctx.SetLastEventNonce(ctx.LastEventNonce() + 1)
66+
ctx.SetLastBatchNonce(ctx.LastBatchNonce() + 1)
67+
}
68+
5469
for _, tx := range block.Transactions {
5570
if tx.Type == uint64(transaction.TypeSend) {
5671
data, _ := tx.Data.UnmarshalNew()

0 commit comments

Comments
 (0)