fix get headers when less than 100 fetched
This commit is contained in:
parent
16ec6a96e9
commit
07da9d720b
@ -95,10 +95,12 @@ func (blockChain *BlockChain) getPOWHeaders(blockNumbers []int64) (headers []cor
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, POWHeader := range POWHeaders {
|
for _, POWHeader := range POWHeaders {
|
||||||
|
if POWHeader.Number != nil {
|
||||||
header, _ := blockChain.headerConverter.Convert(&POWHeader, POWHeader.Hash().String())
|
header, _ := blockChain.headerConverter.Convert(&POWHeader, POWHeader.Hash().String())
|
||||||
|
|
||||||
headers = append(headers, header)
|
headers = append(headers, header)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return headers, err
|
return headers, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user