From 7cf83cee5240f76bdf8ff4f1024643fd126e1018 Mon Sep 17 00:00:00 2001 From: Domino Valdano Date: Mon, 23 Apr 2018 00:01:21 -0700 Subject: [PATCH 1/4] eth/downloader: fix for Issue #16539 (#16546) --- eth/downloader/downloader.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 8b181b8ad4..43f0e3db97 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -306,7 +306,7 @@ func (d *Downloader) UnregisterPeer(id string) error { d.cancelLock.RUnlock() if master { - d.Cancel() + d.cancel() } return nil } @@ -501,8 +501,10 @@ func (d *Downloader) spawnSync(fetchers []func() error) error { return err } -// Cancel cancels all of the operations and resets the queue. -func (d *Downloader) Cancel() { +// cancel aborts all of the operations and resets the queue. However, cancel does +// not wait for the running download goroutines to finish. This method should be +// used when cancelling the downloads from inside the downloader. +func (d *Downloader) cancel() { // Close the current cancel channel d.cancelLock.Lock() if d.cancelCh != nil { @@ -514,6 +516,12 @@ func (d *Downloader) Cancel() { } } d.cancelLock.Unlock() +} + +// Cancel aborts all of the operations and waits for all download goroutines to +// finish before returning. +func (d *Downloader) Cancel() { + d.cancel() d.cancelWg.Wait() } From cbdaa0ca2a955012274bd2c47bd52b24b2beb66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 23 Apr 2018 10:02:34 +0300 Subject: [PATCH 2/4] =?UTF-8?q?params:=20release=20Geth=20v1.8.5=20-=20Dir?= =?UTF-8?q?ty=20Derivative=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/version.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/params/version.go b/params/version.go index 9d7f2ec838..e832c13401 100644 --- a/params/version.go +++ b/params/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 8 // Minor version component of the current release - VersionPatch = 5 // Patch version component of the current release - VersionMeta = "unstable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 8 // Minor version component of the current release + VersionPatch = 5 // Patch version component of the current release + VersionMeta = "stable" // Version metadata to append to the version string ) // Version holds the textual version string. From 50aa1dcfdafd755459113d7cb65ce7376fa11747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 23 Apr 2018 10:06:45 +0300 Subject: [PATCH 3/4] VERSION, params: begin Geth 1.8.6 release cycle --- VERSION | 2 +- params/version.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 8decb929b9..f263cd11b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.5 +1.8.6 diff --git a/params/version.go b/params/version.go index e832c13401..81eebbbcf0 100644 --- a/params/version.go +++ b/params/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 8 // Minor version component of the current release - VersionPatch = 5 // Patch version component of the current release - VersionMeta = "stable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 8 // Minor version component of the current release + VersionPatch = 6 // Patch version component of the current release + VersionMeta = "unstable" // Version metadata to append to the version string ) // Version holds the textual version string. From 26a4dbb4677eb14c3cc96c7b7591820454956b45 Mon Sep 17 00:00:00 2001 From: Vie Date: Mon, 23 Apr 2018 18:45:43 +0800 Subject: [PATCH 4/4] cmd/geth: update the copyright year in the geth command usage (#16537) --- cmd/geth/main.go | 2 +- cmd/geth/usage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index d6a004c7a8..d500726ce1 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -146,7 +146,7 @@ func init() { // Initialize the CLI app and start Geth app.Action = geth app.HideVersion = true // we have a command to print the version - app.Copyright = "Copyright 2013-2017 The go-ethereum Authors" + app.Copyright = "Copyright 2013-2018 The go-ethereum Authors" app.Commands = []cli.Command{ // See chaincmd.go: initCommand, diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index a1558c2330..d934c6b021 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -33,7 +33,7 @@ import ( var AppHelpTemplate = `NAME: {{.App.Name}} - {{.App.Usage}} - Copyright 2013-2017 The go-ethereum Authors + Copyright 2013-2018 The go-ethereum Authors USAGE: {{.App.HelpName}} [options]{{if .App.Commands}} command [command options]{{end}} {{if .App.ArgsUsage}}{{.App.ArgsUsage}}{{else}}[arguments...]{{end}}