From 4361f7057d52ff73a2a42dc208666481433c5ca9 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Sun, 20 Sep 2020 15:20:34 -0700 Subject: [PATCH] Update version info --- services/network_service.go | 5 +++-- services/network_service_test.go | 6 ++++-- services/types.go | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/services/network_service.go b/services/network_service.go index 647ed45..0d1932b 100644 --- a/services/network_service.go +++ b/services/network_service.go @@ -87,8 +87,9 @@ func (s *NetworkAPIService) NetworkOptions( ) (*types.NetworkOptionsResponse, *types.Error) { return &types.NetworkOptionsResponse{ Version: &types.Version{ - RosettaVersion: "1.4.2", - NodeVersion: "0.0.1", + RosettaVersion: RosettaVersion, + NodeVersion: NodeVersion, + MiddlewareVersion: &MiddlewareVersion, }, Allow: &types.Allow{ OperationStatuses: bitcoin.OperationStatuses, diff --git a/services/network_service_test.go b/services/network_service_test.go index 86b36f7..8d8dbb2 100644 --- a/services/network_service_test.go +++ b/services/network_service_test.go @@ -27,10 +27,12 @@ import ( ) var ( + middlewareVersion = "0.0.2" defaultNetworkOptions = &types.NetworkOptionsResponse{ Version: &types.Version{ - RosettaVersion: "1.4.2", - NodeVersion: "0.0.1", + RosettaVersion: "1.4.4", + NodeVersion: "0.20.1", + MiddlewareVersion: &middlewareVersion, }, Allow: &types.Allow{ OperationStatuses: bitcoin.OperationStatuses, diff --git a/services/types.go b/services/types.go index dad143d..158c0b3 100644 --- a/services/types.go +++ b/services/types.go @@ -22,6 +22,25 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" ) +const ( + // RosettaVersion is the version of the + // Rosetta Specification we are using. + RosettaVersion = "1.4.4" + + // NodeVersion is the version of + // bitcoin core we are using. + NodeVersion = "0.20.1" +) + +var ( + // MiddlewareVersion is the version + // of rosetta-bitcoin. We set this as a + // variable instead of a constant because + // we typically need the pointer of this + // value. + MiddlewareVersion = "0.0.2" +) + // Client is used by the servicers to get Peer information // and to submit transactions. type Client interface {