fix localEndBlock nil check

This commit is contained in:
Lucca Martins 2025-06-03 15:09:00 -03:00
parent 45ce0ee589
commit c60e97fb73
No known key found for this signature in database
GPG key ID: DC3D7F76BDAE23BF

View file

@ -64,7 +64,7 @@ func (b *EthAPIBackend) GetVoteOnHash(ctx context.Context, starBlockNr uint64, e
// Check if end block exist // Check if end block exist
localEndBlock, err := b.BlockByNumber(ctx, rpc.BlockNumber(endBlockNr)) localEndBlock, err := b.BlockByNumber(ctx, rpc.BlockNumber(endBlockNr))
if err != nil { if err != nil || localEndBlock == nil {
return false, errEndBlock return false, errEndBlock
} }