fix get headers when less than 100 fetched
This commit is contained in:
parent
16ec6a96e9
commit
07da9d720b
@ -95,9 +95,11 @@ func (blockChain *BlockChain) getPOWHeaders(blockNumbers []int64) (headers []cor
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, POWHeader := range POWHeaders {
|
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
|
return headers, err
|
||||||
|
Loading…
Reference in New Issue
Block a user