diff --git a/core/blockchain.go b/core/blockchain.go index 84652aa042..ad312ed3d7 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -27,9 +27,12 @@ import ( "sync/atomic" "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/consensus/posv" + contractValidator "github.com/ethereum/go-ethereum/contracts/validator/contract" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" @@ -44,9 +47,6 @@ import ( "github.com/ethereum/go-ethereum/trie" "github.com/hashicorp/golang-lru" "gopkg.in/karalabe/cookiejar.v2/collections/prque" - "github.com/ethereum/go-ethereum/consensus/posv" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - contractValidator "github.com/ethereum/go-ethereum/contracts/validator/contract" ) var ( @@ -698,7 +698,7 @@ func (bc *BlockChain) procFutureBlocks() { type WriteStatus byte const ( - NonStatTy WriteStatus = iota + NonStatTy WriteStatus = iota CanonStatTy SideStatTy ) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 89a274c0de..77390495b0 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1329,7 +1329,7 @@ func (d *Downloader) processFullSyncContent() error { length := len(results) start := int(results[0].Header.Number.Uint64() % epoch) end := int(epoch - gap - uint64(start)) - if (end < 0) { + if end < 0 { end = end + int(epoch) } start = 0 @@ -1353,7 +1353,7 @@ func (d *Downloader) processFullSyncContent() error { } start = end + 1 end = end + int(epoch) - if (start >= length) { + if start >= length { break } }