Browse Source

Merge pull request #28 from pbca26/master

added min notaries initial query limit
all-modes
Satinder Grewal 8 years ago
committed by GitHub
parent
commit
7e0c0b0a91
  1. 7
      gui/init.js
  2. 19
      gui/loading.js
  3. 2
      main.js
  4. 1
      routes/shepherd.js

7
gui/init.js

@ -15,7 +15,6 @@ $(document).ready(function() {
StartIguana(); StartIguana();
} }
if (appConf && !appConf.skipBasiliskNetworkCheck) {
var portcheck; var portcheck;
function sartcheck() { function sartcheck() {
@ -26,7 +25,7 @@ $(document).ready(function() {
if (result !== 'error') { if (result !== 'error') {
stopcheck(); stopcheck();
$('#loading_status_text').text('Connecting to Basilisk Network...'); $('#loading_status_text').text('Connecting to Basilisk Network...');
EDEX_DEXgetinfoAll(); EDEX_DEXgetinfoAll(appConf.skipBasiliskNetworkCheck, appConf.minNotaries);
} }
}) })
//var check = Iguana_activehandle(); //var check = Iguana_activehandle();
@ -39,8 +38,4 @@ $(document).ready(function() {
} }
sartcheck(); sartcheck();
//setTimeout(function(){ window.close(); }, 15000);
} else {
window.hide();
}
}); });

19
gui/loading.js

@ -108,7 +108,11 @@ function EDEX_DEXnotarychains() {
}); });
} }
function EDEX_DEXgetinfoAll() { function EDEX_DEXgetinfoAll(skip, minNotaries) {
const remote = require('electron').remote;
var window = remote.getCurrentWindow();
if (!skip) {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = { ajax_data = {
'userpass': tmpIguanaRPCAuth, 'userpass': tmpIguanaRPCAuth,
@ -117,9 +121,8 @@ function EDEX_DEXgetinfoAll() {
}, },
tmp_index = 0, tmp_index = 0,
get_dex_notarychains = IguanaAJAX('http://127.0.0.1:7778', ajax_data).done(function(data) { get_dex_notarychains = IguanaAJAX('http://127.0.0.1:7778', ajax_data).done(function(data) {
//console.log(get_dex_notarychains.responseText);
get_dex_notarychains = JSON.parse(get_dex_notarychains.responseText); get_dex_notarychains = JSON.parse(get_dex_notarychains.responseText);
//console.log(get_dex_notarychains) get_dex_notarychains = get_dex_notarychains.splice(0, minNotaries);
$.each(get_dex_notarychains, function( coin_index, coin_value ) { $.each(get_dex_notarychains, function( coin_index, coin_value ) {
console.log(coin_index + ': ' + coin_value); console.log(coin_index + ': ' + coin_value);
@ -129,8 +132,7 @@ function EDEX_DEXgetinfoAll() {
'agent': 'dex', 'agent': 'dex',
'method': 'getinfo', 'method': 'getinfo',
'symbol': coin_value 'symbol': coin_value
}, };
basiliskMinNotariesConnected = 10;
console.log(ajax_data); console.log(ajax_data);
@ -148,10 +150,8 @@ function EDEX_DEXgetinfoAll() {
$('#loading_sub_status_output_text').text('Output: Connected'); $('#loading_sub_status_output_text').text('Output: Connected');
} }
if ( tmp_index == 10 ) { if ( tmp_index == minNotaries ) {
console.log('min notaries connected'); console.log('min notaries connected');
const remote = require('electron').remote;
var window = remote.getCurrentWindow();
window.hide(); window.hide();
} }
}).fail(function(xhr, textStatus, error) { }).fail(function(xhr, textStatus, error) {
@ -165,4 +165,7 @@ function EDEX_DEXgetinfoAll() {
} }
}); });
}); });
} else {
window.hide();
}
} }

2
main.js

@ -63,7 +63,7 @@ guiapp.use('/shepherd', shepherd);
var rungui = guiapp.listen(appConfig.iguanaAppPort, function () { var rungui = guiapp.listen(appConfig.iguanaAppPort, function () {
console.log('guiapp listening on port ' + appConfig.iguanaAppPort + '!'); console.log('guiapp listening on port ' + appConfig.iguanaAppPort + '!');
}) });
module.exports = guiapp; module.exports = guiapp;
// END GUI App Settings // END GUI App Settings

1
routes/shepherd.js

@ -62,6 +62,7 @@ shepherd.appConfig = {
"iguanaGuiOnly": false, "iguanaGuiOnly": false,
"manualIguanaStart": false, "manualIguanaStart": false,
"skipBasiliskNetworkCheck": false, "skipBasiliskNetworkCheck": false,
"minNotaries": 50,
"host": "127.0.0.1", "host": "127.0.0.1",
"iguanaAppPort": 17777, "iguanaAppPort": 17777,
"iguanaCorePort": 7778, "iguanaCorePort": 7778,

Loading…
Cancel
Save