rpcserver: Use func for semver string.
This constructs the RPC API semantic version string from the individual major, minor, and path constants versus requiring updates in both places. This is something contributors have previously forgotten to update, so it makes sense to avoid the need to do it altogether.
This commit is contained in:
parent
61705d7501
commit
1f308b4cb2
@ -54,10 +54,9 @@ import (
|
||||
|
||||
// API version constants
|
||||
const (
|
||||
jsonrpcSemverString = "6.1.1"
|
||||
jsonrpcSemverMajor = 6
|
||||
jsonrpcSemverMinor = 1
|
||||
jsonrpcSemverPatch = 2
|
||||
jsonrpcSemverMajor = 6
|
||||
jsonrpcSemverMinor = 1
|
||||
jsonrpcSemverPatch = 2
|
||||
)
|
||||
|
||||
const (
|
||||
@ -99,6 +98,11 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
// jsonrpcSemverString is the RPC server's semantic API version formatted as
|
||||
// a string.
|
||||
jsonrpcSemverString = fmt.Sprintf("%d.%d.%d", jsonrpcSemverMajor,
|
||||
jsonrpcSemverMinor, jsonrpcSemverPatch)
|
||||
|
||||
// blake256Pad is the extra blake256 internal padding needed for the
|
||||
// data of the getwork RPC. It is set in the init routine since it is
|
||||
// based on the size of the block header and requires a bit of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user