Browse Source

sync only fix

all-modes
pbca26 8 years ago
parent
commit
2b7ffbefc7
  1. 8
      main.js
  2. 4
      routes/shepherd.js

8
main.js

@ -42,11 +42,11 @@ if (os.platform() === 'linux') {
// GUI APP settings and starting gui on address http://120.0.0.1:17777 // GUI APP settings and starting gui on address http://120.0.0.1:17777
var shepherd = require('./routes/shepherd'), var shepherd = require('./routes/shepherd'),
guiapp = express(); guiapp = express();
shepherd.createIguanaDirs(); shepherd.createIguanaDirs();
const appSessionHash = md5(new Date(Date.now()).toLocaleString); const appSessionHash = md5(Date.now());
shepherd.writeLog('app init ' + appSessionHash); shepherd.writeLog('app init ' + appSessionHash);
shepherd.writeLog('app info: ' + appBasicInfo.name + ' ' + appBasicInfo.version); shepherd.writeLog('app info: ' + appBasicInfo.name + ' ' + appBasicInfo.version);
@ -365,9 +365,9 @@ function createWindow (status) {
if (appConfig.edexGuiOnly) { if (appConfig.edexGuiOnly) {
if (appConfig.v2) { if (appConfig.v2) {
shepherd.writeLog('show edex gui'); shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://127.0.0.1:3000'); // mainWindow.loadURL('http://127.0.0.1:3000');
mainWindow.appConfig = appConfig; mainWindow.appConfig = appConfig;
//mainWindow.appSessionHash = appSessionHash; mainWindow.appSessionHash = appSessionHash;
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build');
} else { } else {
shepherd.writeLog('show edex gui'); shepherd.writeLog('show edex gui');

4
routes/shepherd.js

@ -475,7 +475,7 @@ shepherd.getSyncOnlyForksInfo = function() {
if (iguanaInstanceRegistry[port].mode.indexOf('/sync') > -1) { if (iguanaInstanceRegistry[port].mode.indexOf('/sync') > -1) {
syncOnlyIguanaInstanceInfo[port] = {}; syncOnlyIguanaInstanceInfo[port] = {};
request({ request({
url: 'http://localhost:' + port + '/api/bitcoinrpc/getinfo?userpass=tmpIgRPCUser@1234', url: 'http://localhost:' + port + '/api/bitcoinrpc/getinfo?userpass=tmpIgRPCUser@' + shepherd.appSessionHash,
method: 'GET' method: 'GET'
}, function (error, response, body) { }, function (error, response, body) {
if (response && response.statusCode && response.statusCode === 200) { if (response && response.statusCode && response.statusCode === 200) {
@ -488,7 +488,7 @@ shepherd.getSyncOnlyForksInfo = function() {
} }
}); });
request({ request({
url: 'http://localhost:' + port + '/api/SuperNET/activehandle?userpass=tmpIgRPCUser@1234', url: 'http://localhost:' + port + '/api/SuperNET/activehandle?userpass=' + shepherd.appSessionHash,
method: 'GET' method: 'GET'
}, function (error, response, body) { }, function (error, response, body) {
if (response && response.statusCode && response.statusCode === 200) { if (response && response.statusCode && response.statusCode === 200) {

Loading…
Cancel
Save