common/versions, cmd/utils: add geth version contract

This commit is contained in:
Gustav Simonsson authored and Péter Szilágyi committed 2016-05-02 10:31:54 +03:00
1 parent 1c20313a6a
commit ecd7199c43
4 files changed
+375

No files matched your search

+7
View File
@@ -34,6 +34,7 @@ import (
"github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/versions"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/crypto"
@@ -773,6 +774,12 @@ func MakeSystemNode(name, version string, extra []byte, ctx *cli.Context) *node.
}
}
err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
return versions.NewVersionCheck(ctx)
})
if err != nil {
Fatalf("Failed to register the Version Check service: %v", err)
}
return stack
}