Skip to content

Commit

Permalink
Fix response for getBlockOrCandidateByHash
Browse files Browse the repository at this point in the history
  • Loading branch information
wizeguyy committed Oct 3, 2024
1 parent 21a48f4 commit 4520d17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/quaiapi/quai_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,10 @@ func (s *PublicBlockChainQuaiAPI) GetBlockByHash(ctx context.Context, hash commo
}

func (s *PublicBlockChainQuaiAPI) GetBlockOrCandidateByHash(ctx context.Context, hash common.Hash, fullTx bool) (map[string]interface{}, error) {
block := s.b.BlockOrCandidateByHash(hash)
if block != nil {
if block := s.b.BlockOrCandidateByHash(hash); block != nil {
return s.rpcMarshalBlock(ctx, block, true, fullTx)
}
return nil, errors.New("block not found")
return nil, nil
}

// GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash and index. When fullTx is true
Expand Down

0 comments on commit 4520d17

Please sign in to comment.