Skip to content

Commit ba9d9ce

Browse files
Merge pull request #11 from coinbase/patrick/add-versioning-info
[Services] Add versioning info
2 parents 4f87ff7 + fd4b355 commit ba9d9ce

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
name: default
5151
steps:
5252
- *fast-checkout
53-
- run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
53+
- run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
5454
- run: make lint
5555
check-license:
5656
executor:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ check-comments:
4444
${GOLINT_CMD} -set_exit_status ${GO_FOLDERS} .
4545

4646
lint: | check-comments
47-
golangci-lint run -v -E ${LINT_SETTINGS},gomnd
47+
golangci-lint run --timeout 2m0s -v -E ${LINT_SETTINGS},gomnd
4848

4949
add-license:
5050
${ADDLICENCE_SCRIPT} .

services/network_service.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ func (s *NetworkAPIService) NetworkOptions(
8787
) (*types.NetworkOptionsResponse, *types.Error) {
8888
return &types.NetworkOptionsResponse{
8989
Version: &types.Version{
90-
RosettaVersion: "1.4.2",
91-
NodeVersion: "0.0.1",
90+
RosettaVersion: RosettaVersion,
91+
NodeVersion: NodeVersion,
92+
MiddlewareVersion: &MiddlewareVersion,
9293
},
9394
Allow: &types.Allow{
9495
OperationStatuses: bitcoin.OperationStatuses,

services/network_service_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ import (
2727
)
2828

2929
var (
30+
middlewareVersion = "0.0.2"
3031
defaultNetworkOptions = &types.NetworkOptionsResponse{
3132
Version: &types.Version{
32-
RosettaVersion: "1.4.2",
33-
NodeVersion: "0.0.1",
33+
RosettaVersion: "1.4.4",
34+
NodeVersion: "0.20.1",
35+
MiddlewareVersion: &middlewareVersion,
3436
},
3537
Allow: &types.Allow{
3638
OperationStatuses: bitcoin.OperationStatuses,

services/types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ import (
2222
"github.com/coinbase/rosetta-sdk-go/types"
2323
)
2424

25+
const (
26+
// RosettaVersion is the version of the
27+
// Rosetta Specification we are using.
28+
RosettaVersion = "1.4.4"
29+
30+
// NodeVersion is the version of
31+
// bitcoin core we are using.
32+
NodeVersion = "0.20.1"
33+
)
34+
35+
var (
36+
// MiddlewareVersion is the version
37+
// of rosetta-bitcoin. We set this as a
38+
// variable instead of a constant because
39+
// we typically need the pointer of this
40+
// value.
41+
MiddlewareVersion = "0.0.2"
42+
)
43+
2544
// Client is used by the servicers to get Peer information
2645
// and to submit transactions.
2746
type Client interface {

0 commit comments

Comments
 (0)