Skip to content

Commit

Permalink
Removed the check for milestoneID in the GetVoteOnHash()
Browse files Browse the repository at this point in the history
  • Loading branch information
VAIBHAVJINDAL3012 committed Dec 18, 2023
1 parent 8b2f024 commit dac4c40
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions eth/bor_api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,6 @@ func (b *EthAPIBackend) GetVoteOnHash(ctx context.Context, starBlockNr uint64, e
return false, fmt.Errorf("Hash mismatch: localChainHash %s, milestoneHash %s", localEndBlockHash, hash)
}

ethHandler := (*ethHandler)(b.eth.handler)

bor, ok := ethHandler.chain.Engine().(*bor.Bor)

if !ok {
return false, fmt.Errorf("Bor not available")
}

err = bor.HeimdallClient.FetchMilestoneID(ctx, milestoneId)

if err != nil {
downloader.UnlockMutex(false, "", endBlockNr, common.Hash{})
return false, fmt.Errorf("Milestone ID doesn't exist in Heimdall")
}

downloader.UnlockMutex(true, milestoneId, endBlockNr, localEndBlock.Hash())

return true, nil
Expand Down

0 comments on commit dac4c40

Please sign in to comment.