[sync] fix two bugs

pull/3612/head
Jacky Wang 4 years ago
parent d4ae4fb1a6
commit a4001a92de
No known key found for this signature in database
GPG Key ID: 1085CE5F4FF5842C
  1. 2
      api/service/legacysync/syncing.go
  2. 2
      node/node_syncing.go

@ -593,7 +593,7 @@ func (ss *StateSync) downloadBlocks(bc *core.BlockChain) {
if count > downloadBlocksRetryLimit {
break
}
if err := ss.stateSyncTaskQueue.Put(failedTasks); err != nil {
if err := taskQueue.put(failedTasks); err != nil {
utils.Logger().Warn().
Err(err).
Interface("taskIndexes", failedTasks.indexes()).

@ -605,7 +605,7 @@ func (node *Node) getEncodedBlockWithSigByHash(hash common.Hash) ([]byte, error)
func (node *Node) getCommitSigAndBitmap(block *types.Block) ([]byte, error) {
child := node.Blockchain().GetBlockByNumber(block.NumberU64() + 1)
if child == nil {
if child != nil {
return node.getCommitSigFromChild(block, child)
}
return node.getCommitSigFromDB(block)

Loading…
Cancel
Save