Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat: remove insight API #351

Merged
merged 35 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
25e0830
feat: add getStatus method
Alex-Werner Mar 1, 2021
4bc1364
fix: replace rpcServer to dashCoreRpcClient
Alex-Werner Mar 1, 2021
1d83bb2
feat: add getStatus method
Alex-Werner Mar 1, 2021
9e1b8ff
test: update mock from API to RPC
Alex-Werner Mar 1, 2021
a363ae5
feat!: update to dashd v18
Alex-Werner Mar 1, 2021
1c1e2b5
feat: removed getStatus in favor of two separate call
Alex-Werner Mar 11, 2021
2c89b09
feat: update getStatusHandler
Alex-Werner Mar 11, 2021
a67fe71
feat: use temporary branch
Alex-Werner Mar 11, 2021
1ea1eac
chore: force https for dependency
Alex-Werner Mar 11, 2021
ceb58a5
Merge remote-tracking branch 'origin/feat/get-status' into feat/get-s…
antouhou Mar 11, 2021
1b0478c
update lock file
antouhou Mar 11, 2021
6457c0f
feat: added getMnSync and getMasternode rpc
Alex-Werner Mar 11, 2021
a8c8e98
feat: provide mnSync and masternode status response
Alex-Werner Mar 11, 2021
129befc
useless commit to restart the build
antouhou Mar 12, 2021
3233bde
Merge remote-tracking branch 'origin/feat/get-status' into feat/get-s…
antouhou Mar 12, 2021
369d506
remove useless commit
antouhou Mar 12, 2021
a7b77b6
test: provide coverage for getStatus
Alex-Werner Mar 12, 2021
9cca8ee
fix: state -> status
Alex-Werner Mar 12, 2021
21e1b0c
update dapi-client to 0.18.0 to fix docker build
antouhou Mar 15, 2021
be2e327
Merge remote-tracking branch 'origin/feat/get-status' into feat/get-s…
antouhou Mar 15, 2021
d5ee046
tests: fixed get network
Alex-Werner Mar 16, 2021
b7bf17f
Merge branch 'v0.19-dev' into feat/get-status
Alex-Werner Mar 18, 2021
1b52d92
feat: parallelise request
Alex-Werner Mar 18, 2021
6b15dda
typo: remove extra space
Alex-Werner Mar 18, 2021
bcff9f4
chore: update dapi-grpc package from v0.19-dev
Alex-Werner Mar 18, 2021
b937b57
chore: rebuild package-lock
Alex-Werner Mar 18, 2021
ba8b5d7
chore: update DAPI gRPC
shumkov Mar 22, 2021
3bd5e74
Merge branch 'v0.19-dev' into feat/get-status
shumkov Mar 22, 2021
26d1107
fix: wrong values set to protobuf object
shumkov Mar 23, 2021
5e062a9
Merge branch 'v0.19-dev' into feat/get-status
antouhou Apr 7, 2021
f67e239
update package-lock.json after 0.19 merge
antouhou Apr 7, 2021
f4de9b5
Merge branch 'v0.19-dev' into feat/get-status
antouhou Apr 8, 2021
b52d0d2
fix linting errors
antouhou Apr 8, 2021
c8e03a4
feat: remove insight API
Apr 9, 2021
94a34b7
Merge branch 'v0.19-dev' into remove-insight
antouhou Apr 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/config/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const OPTIONS = {
INSIGHT_URI: 'INSIGHT_URI',
LIVENET: 'LIVENET',
API_JSON_RPC_PORT: 'API_JSON_RPC_PORT',
API_GRPC_PORT: 'API_GRPC_PORT',
Expand All @@ -22,7 +21,6 @@ const OPTIONS = {

const DEFAULT_CONFIG = {};

DEFAULT_CONFIG[OPTIONS.INSIGHT_URI] = 'http://127.0.0.1:3001/insight-api';
DEFAULT_CONFIG[OPTIONS.LIVENET] = false;
DEFAULT_CONFIG[OPTIONS.API_JSON_RPC_PORT] = 2501;
DEFAULT_CONFIG[OPTIONS.API_GRPC_PORT] = 2500;
Expand Down Expand Up @@ -54,7 +52,6 @@ Object
const config = Object.assign({}, DEFAULT_CONFIG, envConfig);

module.exports = {
insightUri: config[OPTIONS.INSIGHT_URI],
livenet: Boolean(config[OPTIONS.LIVENET]),
rpcServer: {
port: parseInt(config[OPTIONS.API_JSON_RPC_PORT], 10),
Expand Down
1 change: 0 additions & 1 deletion lib/config/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function validatePort(port, parameterName) {
*/
function validateConfig(config) {
const validationResults = [];
validationResults.push(validateHost(config.insightUri, 'INSIGHT_URI'));
validationResults.push(validateHost(config.dashcore.p2p.host, 'DASHCORE_P2P_HOST'));
validationResults.push(validatePort(config.dashcore.p2p.port, 'DASHCORE_P2P_PORT'));
validationResults.push(validateHost(config.dashcore.rpc.host, 'DASHCORE_RPC_HOST'));
Expand Down
207 changes: 0 additions & 207 deletions lib/externalApis/insight/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions lib/grpcServer/handlers/core/coreHandlersFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ const broadcastTransactionHandlerFactory = require(
);

/**
* @param {InsightAPI} insightAPI
* @param {CoreRpcClient} coreRPCClient
* @param {boolean} isProductionEnvironment
* @returns {Object<string, function>}
*/
function coreHandlersFactory(insightAPI, coreRPCClient, isProductionEnvironment) {
function coreHandlersFactory(coreRPCClient, isProductionEnvironment) {
const wrapInErrorHandler = wrapInErrorHandlerFactory(log, isProductionEnvironment);

// getBlock
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions scripts/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const { validateConfig } = require('../lib/config/validator');
const log = require('../lib/log');
const rpcServer = require('../lib/rpcServer/server');
const DriveClient = require('../lib/externalApis/drive/DriveClient');
const insightAPI = require('../lib/externalApis/insight');
const dashCoreRpcClient = require('../lib/externalApis/dashcore/rpc');
const BlockchainListener = require('../lib/externalApis/tenderdash/BlockchainListener');
const DriveStateRepository = require('../lib/dpp/DriveStateRepository');
Expand Down Expand Up @@ -102,7 +101,6 @@ async function main() {
log.info('Starting GRPC server');

const coreHandlers = coreHandlersFactory(
insightAPI,
dashCoreRpcClient,
isProductionEnvironment,
);
Expand Down
1 change: 0 additions & 1 deletion test/mocks/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module.exports = {
getConfigFixture() {
return {
insightUri: '123',
dashcore: {
p2p: {
host: '123',
Expand Down
Loading