• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revision84b42147c49c9eb6ed330457340d04818be78452 (tree)
Time2019-07-11 10:04:52
AuthorYahtoo Ma <yahtoo.ma@gmai...>
CommiterYahtoo Ma

Log Message

Fix review bug

Change Summary

Incremental Difference

--- a/netsync/chainmgr/block_keeper.go
+++ b/netsync/chainmgr/block_keeper.go
@@ -119,7 +119,11 @@ func (bk *blockKeeper) locateHeaders(locator []*bc.Hash, stopHash *bc.Hash, skip
119119 }
120120
121121 headers = append(headers, startHeader)
122- for num, index := uint64(0), startHeader.Height; num < maxNum-1 && index < stopHeader.Height; num++ {
122+ if stopHeader.Height == startHeader.Height {
123+ return headers, nil
124+ }
125+
126+ for num, index := uint64(0), startHeader.Height; num < maxNum-1; num++ {
123127 index += skip + 1
124128 if index >= stopHeader.Height {
125129 headers = append(headers, stopHeader)
--- a/netsync/chainmgr/block_process.go
+++ b/netsync/chainmgr/block_process.go
@@ -57,8 +57,7 @@ func (bp *blockProcessor) process(downloadNotifyCh chan struct{}, ProcessStop ch
5757 bp.storage.deleteBlock(nextHeight)
5858 }
5959
60- _, ok := <-downloadNotifyCh
61- if !ok {
60+ if _, ok := <-downloadNotifyCh; !ok {
6261 return
6362 }
6463 }
Show on old repository browser