Merge pull request #3578 from rlan35/main

fix check nil bug
pull/3579/head
Rongjian Lan 4 years ago committed by GitHub
commit def04c8ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      hmy/blockchain.go

@ -315,7 +315,7 @@ func (hmy *Harmony) GetLogs(ctx context.Context, blockHash common.Hash, isEth bo
} }
if isEth { if isEth {
block := hmy.BlockChain.GetBlockByHash(blockHash) block := hmy.BlockChain.GetBlockByHash(blockHash)
if block != nil { if block == nil {
return nil, errors.New("Missing block data") return nil, errors.New("Missing block data")
} }
txns := block.Transactions() txns := block.Transactions()

Loading…
Cancel
Save