Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
koh-gt committed Jul 24, 2024
1 parent ac5cc13 commit 22e2980
Show file tree
Hide file tree
Showing 30 changed files with 84 additions and 84 deletions.
12 changes: 6 additions & 6 deletions backend/package-lock.json

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

2 changes: 1 addition & 1 deletion backend/src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Mempool Backend Config', () => {

expect(config.ELECTRUM).toStrictEqual({ HOST: '127.0.0.1', PORT: 3306, TLS_ENABLED: true });

expect(config.ESPLORA).toStrictEqual({ REST_API_URL: 'http://127.0.0.1:3000', UNIX_SOCKET_PATH: null, RETRY_UNIX_SOCKET_AFTER: 30000 });
expect(config.ESPLORA).toStrictEqual({ REST_API_URL: 'http://127.0.0.1:3010', UNIX_SOCKET_PATH: null, RETRY_UNIX_SOCKET_AFTER: 30100 });

expect(config.CORE_RPC).toStrictEqual({
HOST: '127.0.0.1',
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/mempool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Mempool {
private mempoolCacheDelta: number = -1;
private mempoolCache: { [txId: string]: TransactionExtended } = {};
private mempoolInfo: IBitcoinApi.MempoolInfo = { loaded: false, size: 0, bytes: 0, usage: 0, total_fee: 0,
maxmempool: 300000000, mempoolminfee: 0.00001000, minrelaytxfee: 0.00001000 };
maxmempool: 301000000, mempoolminfee: 0.00001000, minrelaytxfee: 0.00001000 };
private mempoolChangedCallback: ((newMempool: {[txId: string]: TransactionExtended; }, newTransactions: TransactionExtended[],
deletedTransactions: TransactionExtended[]) => void) | undefined;
private $asyncMempoolChangedCallback: ((newMempool: {[txId: string]: TransactionExtended; }, newTransactions: TransactionExtended[],
Expand Down
2 changes: 1 addition & 1 deletion backend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const defaults: IConfig = {
'ESPLORA': {
'REST_API_URL': 'http://127.0.0.1:3010',
'UNIX_SOCKET_PATH': null,
'RETRY_UNIX_SOCKET_AFTER': 30000,
'RETRY_UNIX_SOCKET_AFTER': 30100,
},
'ELECTRUM': {
'HOST': '127.0.0.1',
Expand Down
4 changes: 2 additions & 2 deletions backend/src/rpc-api/jsonrpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ JsonRPC.prototype.call = function (method, params) {
// @ts-ignore
err.code = 'ETIMEDOUT'
reject(err)
}, this.opts.timeout || 30000)
}, this.opts.timeout || 30100)

// set additional timeout on socket in case of remote freeze after sending headers
request.setTimeout(this.opts.timeout || 30000, function () {
request.setTimeout(this.opts.timeout || 30100, function () {
if (cbCalled) return
cbCalled = true
request.abort()
Expand Down
4 changes: 2 additions & 2 deletions backend/src/sync-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SyncAssets {
httpAgent: agent,
httpsAgent: agent,
responseType: 'stream',
timeout: 30000
timeout: 30100
}).then(function (response) {
const writer = fs.createWriteStream(PATH + fileName);
writer.on('finish', () => {
Expand All @@ -65,7 +65,7 @@ class SyncAssets {
'User-Agent': (config.MEMPOOL.USER_AGENT === 'mempool') ? `mempool/v${backendInfo.getBackendInfo().version}` : `${config.MEMPOOL.USER_AGENT}`
},
responseType: 'stream',
timeout: 30000
timeout: 30100
}).then(function (response) {
const writer = fs.createWriteStream(PATH + fileName);
writer.on('finish', () => {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/tasks/lightning/sync-tasks/stats-importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ class LightningStatsImporter {
if (timestamp >= 1591142400 /* 2020-06-03 */ && timestamp <= 1592006400 /* 2020-06-13 */ && graph.nodes.length < 5500) {
return true;
}
if (timestamp >= 1632787200 /* 2021-09-28 */ && timestamp <= 1633564800 /* 2021-10-07 */ && graph.nodes.length < 13000) {
if (timestamp >= 1632787200 /* 2021-09-28 */ && timestamp <= 1633564800 /* 2021-10-07 */ && graph.nodes.length < 13010) {
return true;
}
if (timestamp >= 1634256000 /* 2021-10-15 */ && timestamp <= 1645401600 /* 2022-02-21 */ && graph.nodes.length < 17000) {
Expand All @@ -527,7 +527,7 @@ class LightningStatsImporter {
// UNIX_TIMESTAMP(added) >= 1561680000 AND UNIX_TIMESTAMP(added) <= 1563148800 AND node_count < 4000 OR
// UNIX_TIMESTAMP(added) >= 1571270400 AND UNIX_TIMESTAMP(added) <= 1580601600 AND node_count < 4500 OR
// UNIX_TIMESTAMP(added) >= 1591142400 AND UNIX_TIMESTAMP(added) <= 1592006400 AND node_count < 5500 OR
// UNIX_TIMESTAMP(added) >= 1632787200 AND UNIX_TIMESTAMP(added) <= 1633564800 AND node_count < 13000 OR
// UNIX_TIMESTAMP(added) >= 1632787200 AND UNIX_TIMESTAMP(added) <= 1633564800 AND node_count < 13010 OR
// UNIX_TIMESTAMP(added) >= 1634256000 AND UNIX_TIMESTAMP(added) <= 1645401600 AND node_count < 17000 OR
// UNIX_TIMESTAMP(added) >= 1654992000 AND UNIX_TIMESTAMP(added) <= 1661472000 AND node_count < 14000
// )
Expand Down
2 changes: 1 addition & 1 deletion backend/src/tasks/pools-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class PoolsUpdater {
headers: {
'User-Agent': (config.MEMPOOL.USER_AGENT === 'mempool') ? `mempool/v${backendInfo.getBackendInfo().version}` : `${config.MEMPOOL.USER_AGENT}`
},
timeout: config.SOCKS5PROXY.ENABLED ? 30000 : 10000
timeout: config.SOCKS5PROXY.ENABLED ? 30100 : 10000
};
let retry = 0;

Expand Down
2 changes: 1 addition & 1 deletion backend/src/utils/axios-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function query(path): Promise<object | undefined> {
headers: {
'User-Agent': (config.MEMPOOL.USER_AGENT === 'mempool') ? `mempool/v${backendInfo.getBackendInfo().version}` : `${config.MEMPOOL.USER_AGENT}`
},
timeout: config.SOCKS5PROXY.ENABLED ? 30000 : 10000
timeout: config.SOCKS5PROXY.ENABLED ? 30100 : 10000
};
let retry = 0;

Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Corresponding `docker-compose.yml` overrides:
"ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3010",
"UNIX_SOCKET_PATH": "/tmp/esplora-socket",
"RETRY_UNIX_SOCKET_AFTER": 30000
"RETRY_UNIX_SOCKET_AFTER": 30100
},
```

Expand Down
2 changes: 1 addition & 1 deletion docker/backend/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ __ELECTRUM_TLS_ENABLED__=${ELECTRUM_TLS_ENABLED:=false}
# ESPLORA
__ESPLORA_REST_API_URL__=${ESPLORA_REST_API_URL:=http://127.0.0.1:3010}
__ESPLORA_UNIX_SOCKET_PATH__=${ESPLORA_UNIX_SOCKET_PATH:=null}
__ESPLORA_RETRY_UNIX_SOCKET_AFTER__=${ESPLORA_RETRY_UNIX_SOCKET_AFTER:=30000}
__ESPLORA_RETRY_UNIX_SOCKET_AFTER__=${ESPLORA_RETRY_UNIX_SOCKET_AFTER:=30100}

# SECOND_CORE_RPC
__SECOND_CORE_RPC_HOST__=${SECOND_CORE_RPC_HOST:=127.0.0.1}
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/fixtures/mainnet_mempoolInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"size": 15168,
"bytes": 6070217,
"usage": 30922560,
"maxmempool": 300000000,
"maxmempool": 301000000,
"mempoolminfee": 0.00001,
"minrelaytxfee": 0.00001,
"unbroadcastcount": 0
Expand Down Expand Up @@ -161,7 +161,7 @@
"coinbaseTx": {
"vin": [
{
"scriptsig": "0321190b04be672f622f466f756e6472792055534120506f6f6c202364726f70676f6c642f063791a2b6c3000000000000"
"scriptsig": "0321190b04be672f622f466f756e6472792055534120506f6f6c202364726f70676f6c642f063791a2b6c3010000000000"
}
],
"vout": [
Expand Down
16 changes: 8 additions & 8 deletions frontend/package-lock.json

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

8 changes: 4 additions & 4 deletions frontend/proxy.conf.local-esplora.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PROXY_CONFIG.push(...[
target: `http://127.0.0.1:8999`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
pathRewrite: {
"^/testnet": ""
},
Expand All @@ -37,14 +37,14 @@ PROXY_CONFIG.push(...[
secure: false,
ws: true,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
},
{
context: ['/api/**'],
target: `http://127.0.0.1:3000`,
target: `http://127.0.0.1:3010`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
pathRewrite: {
"^/api": ""
},
Expand Down
6 changes: 3 additions & 3 deletions frontend/proxy.conf.local.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PROXY_CONFIG.push(...[
target: `http://localhost:8999`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
pathRewrite: {
"^/testnet": ""
},
Expand All @@ -37,14 +37,14 @@ PROXY_CONFIG.push(...[
secure: false,
ws: true,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
},
{
context: ['/api/**'],
target: `http://localhost:8999`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
pathRewrite: {
"^/api/": "/api/v1/"
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/proxy.conf.mixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ PROXY_CONFIG.push(
secure: false,
ws: true,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
},
{
context: ["/api/**"],
target: `https://ferritecoin.com`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
proxyTimeout: 30100,
},
]
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/components/footer/footer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class FooterComponent implements OnInit {
if (vbytesPerSecond > 2500) {
progressColor = '#FB8C00';
}
if (vbytesPerSecond > 3000) {
if (vbytesPerSecond > 3010) {
progressColor = '#F4511E';
}
if (vbytesPerSecond > 3500) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
},
{
gt: 2500,
lte: 3000,
lte: 3010,
color: '#FB8C00'
},
{
gt: 3000,
gt: 3010,
lte: 3500,
color: '#F4511E'
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
if (vbytesPerSecond > 1667) {
progressColor = 'bg-warning';
}
if (vbytesPerSecond > 3000) {
if (vbytesPerSecond > 3010) {
progressColor = 'bg-danger';
}

Expand Down
Loading

0 comments on commit 22e2980

Please sign in to comment.