fix get headers when less than 100 fetched

This commit is contained in:
Taka Goto 2019-01-16 10:16:06 -06:00
parent 16ec6a96e9
commit 07da9d720b

View File

@ -95,9 +95,11 @@ func (blockChain *BlockChain) getPOWHeaders(blockNumbers []int64) (headers []cor
}
for _, POWHeader := range POWHeaders {
header, _ := blockChain.headerConverter.Convert(&POWHeader, POWHeader.Hash().String())
if POWHeader.Number != nil {
header, _ := blockChain.headerConverter.Convert(&POWHeader, POWHeader.Hash().String())
headers = append(headers, header)
headers = append(headers, header)
}
}
return headers, err