[sync] fix testnet syncing panic issue (#3308)

* [sync] fix testnet syncing panic issue

* [sync] add back close connections in initialization
pull/3310/head
Jacky Wang 4 years ago committed by GitHub
parent 75dff6208e
commit bf86767e60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      api/service/syncing/syncing.go

@ -102,6 +102,7 @@ func CreateStateSync(ip string, port string, peerHash [20]byte) *StateSync {
stateSync.selfPeerHash = peerHash stateSync.selfPeerHash = peerHash
stateSync.commonBlocks = make(map[int]*types.Block) stateSync.commonBlocks = make(map[int]*types.Block)
stateSync.lastMileBlocks = []*types.Block{} stateSync.lastMileBlocks = []*types.Block{}
stateSync.syncConfig = &SyncConfig{}
return stateSync return stateSync
} }

Loading…
Cancel
Save