aboutsummaryrefslogtreecommitdiffstats
path: root/release/release.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-30 17:57:50 +0800
committerGitHub <noreply@github.com>2016-06-30 17:57:50 +0800
commit1e50f5dd281d28b8db1c65b9e80e53080b86e369 (patch)
tree30a0832e6f514fe06fe9308043eaa20d2ba44b13 /release/release.go
parentf127799d795eaf2d6f99780c058361cd561492f1 (diff)
parent3a97280ae889bb6852ba16e70750a37b2ed08473 (diff)
downloaddexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar.gz
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar.bz2
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar.lz
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar.xz
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.tar.zst
dexon-1e50f5dd281d28b8db1c65b9e80e53080b86e369.zip
Merge pull request #2159 from zsfelfoldi/light-backend
eth: separate common and full node-specific API and backend service
Diffstat (limited to 'release/release.go')
-rw-r--r--release/release.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/release/release.go b/release/release.go
index 05b4885b5..07eb9359c 100644
--- a/release/release.go
+++ b/release/release.go
@@ -30,6 +30,7 @@ import (
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
+ "golang.org/x/net/context"
)
// Interval to check for new releases
@@ -57,7 +58,7 @@ type ReleaseService struct {
// releases and notify the user of such.
func NewReleaseService(ctx *node.ServiceContext, config Config) (node.Service, error) {
// Retrieve the Ethereum service dependency to access the blockchain
- var ethereum *eth.Ethereum
+ var ethereum *eth.FullNodeService
if err := ctx.Service(&ethereum); err != nil {
return nil, err
}
@@ -110,7 +111,9 @@ func (r *ReleaseService) checker() {
timer.Reset(releaseRecheckInterval)
// Retrieve the current version, and handle missing contracts gracefully
- version, err := r.oracle.CurrentVersion(nil)
+ ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
+ opts := &bind.CallOpts{Context: ctx}
+ version, err := r.oracle.CurrentVersion(opts)
if err != nil {
if err == bind.ErrNoCode {
glog.V(logger.Debug).Infof("Release oracle not found at %x", r.config.Oracle)