-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drive UI updates by ledgercpy workers events
Signed-off-by: Patrik Stas <patrik.stas@gmail.com>
- Loading branch information
1 parent
d0dfea6
commit 45952da
Showing
19 changed files
with
178 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"id": "SOVRIN_BUILDERNET", | ||
"ui": { | ||
"priority": 1, | ||
"display": "BuilderNet", | ||
"display-long": "Sovrin BuilderNet", | ||
"description": "For active development of your solution.", | ||
"tutorial": "Get your DID and start writing on the network", | ||
"tutorial-link": "https://selfserve.sovrin.org/", | ||
"logo-address": "/static/sovrin.png" | ||
}, | ||
"aliases": [ | ||
"sovbuilder" | ||
], | ||
"es" : { | ||
"index": "txs-sovbuilder" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"verbose": true, | ||
"ignore": ["node_modules", ".next"], | ||
"watch": ["src/**/*"], | ||
"ext": "js json", | ||
"env": { | ||
"ES_URL": "http://localhost:9200", | ||
"DAEMON_URL": "http://localhost:3709", | ||
"LOG_LEVEL": "info", | ||
"PORT" : 3708, | ||
"LOG_HTTP_REQUESTS" : true, | ||
"LOG_HTTP_RESPONSES" : true, | ||
"NETWORKS_CONFIG_PATH": "./app-config/sovrin-buildernet.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const OPERATION_TYPES = { | ||
LEDGER_CPY: 'ledgercpy', | ||
EXPANSION: 'expansion' | ||
} | ||
|
||
module.exports = { | ||
OPERATION_TYPES | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const { getExpandedTimingConfig } = require('../../../src/workers/worker-rtw') | ||
const sleep = require('sleep-promise') | ||
|
||
describe('worker timing configuration', () => { | ||
it('should expand timing configuration', async () => { | ||
const timing = getExpandedTimingConfig("FAST") | ||
const expected = { | ||
"timeoutOnSuccess": 1000, | ||
"timeoutOnTxIngestionError": 30000, | ||
"timeoutOnLedgerResolutionError": 30000, | ||
"timeoutOnTxNoFound": 3000, | ||
"jitterRatio": 0.1 | ||
} | ||
expect(timing).toStrictEqual(expected) | ||
}) | ||
|
||
it('should expand timing configuration', async () => { | ||
const timing = { | ||
"timeoutOnSuccess": 1234, | ||
"timeoutOnTxIngestionError": 2345, | ||
"timeoutOnLedgerResolutionError": 3456, | ||
"timeoutOnTxNoFound": 9999, | ||
"jitterRatio": 0.1 | ||
} | ||
const expandedTimingConfig = getExpandedTimingConfig(timing) | ||
expect(expandedTimingConfig).toStrictEqual(timing) | ||
}) | ||
|
||
it('should expand missing timing configuration with defaults', async () => { | ||
const timing = { | ||
"timeoutOnTxIngestionError": 60000, | ||
"timeoutOnLedgerResolutionError": 60000, | ||
"timeoutOnTxNoFound": 9000, | ||
} | ||
const expandedTimingConfig = getExpandedTimingConfig(timing) | ||
const expected = { | ||
"timeoutOnSuccess": 4000, | ||
"timeoutOnTxIngestionError": 60000, | ||
"timeoutOnLedgerResolutionError": 60000, | ||
"timeoutOnTxNoFound": 9000, | ||
"jitterRatio": 0.1 | ||
} | ||
expect(expandedTimingConfig).toStrictEqual(expected) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"verbose": true, | ||
"ignore": ["node_modules", ".next"], | ||
"watch": ["server/**/*", "index.js"], | ||
"ext": "js json", | ||
"env": { | ||
"INDYSCAN_API_URL": "https://indyscan.io", | ||
"PORT" : 3707, | ||
"LOG_LEVEL": "debug", | ||
"LOG_HTTP_REQUESTS" : true, | ||
"LOG_HTTP_RESPONSES" : true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.