mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
gctrpc: endpoints now optionally return timestamps in nanoseconds (configurable) (#718)
* config: add remoteControl/gRPC/timeInNanoSeconds * grpc: consult with remoteControl/gRPC/timeInNanoSeconds whether timestamps should be in seconds or nanos * engine: test if RPCServer.unixTimestamp() respects config/remoteControl/gRPC/timeInNanoSeconds * engine: implement TestRPCServer_GetTicker_LastUpdatedNanos that makes sure TickerResponse.LastUpdated is returned in nanoseconds if configured * config_example.json: add remoteControl/gRPC/timeInNanoSeconds * engine: (1) test RPCServer.unixTimestamp() in parallel, (2) increase time tolerance of TestRPCServer_GetTicker_LastUpdatedNanos() * engine: TestRPCServer_GetTicker_LastUpdatedNanos() now fetches a mock-up ticker to check timestamps
This commit is contained in:
@@ -183,7 +183,8 @@
|
||||
"enabled": true,
|
||||
"listenAddress": "localhost:9052",
|
||||
"grpcProxyEnabled": false,
|
||||
"grpcProxyListenAddress": "localhost:9053"
|
||||
"grpcProxyListenAddress": "localhost:9053",
|
||||
"timeInNanoSeconds": false
|
||||
},
|
||||
"deprecatedRPC": {
|
||||
"enabled": true,
|
||||
@@ -2451,4 +2452,4 @@
|
||||
"supportedExchanges": "Kraken,Bitstamp"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user