Skip to content

Commit

Permalink
node and doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-dan committed May 10, 2016
1 parent 9d9abc0 commit c503deb
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions codesign
Expand Up @@ -28,8 +28,8 @@ if [ -d "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A" ]; then
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A"
fi

codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/eth/eth"
codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/geth/geth"
codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/exp/exp"
codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/gexp/gexp"


codesign -fs "$APP_KEY" --entitlements parent.plist "$APP_PATH"
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -270,7 +270,7 @@ gulp.task('change-files', ['create-binaries'], function() {
])
.pipe(gulp.dest(destPath +'/exp')));

// copy geth node binaries
// copy gexp node binaries
streams.push(gulp.src([
'./nodes/gexp/'+ os + '/*'
])
Expand Down
Expand Up @@ -118,7 +118,7 @@ Template['popupWindows_sendTransactionConfirmation'].helpers({
return ExpTools.formatBalance(new BigNumber(gas, 10).times(new BigNumber(this.gasPrice, 10)), '0,0.0[0000000] unit', 'expanse');
},
/**
Calculates the provided gas amount in ether
Calculates the provided gas amount in expanse
@method (providedGas)
*/
Expand Down Expand Up @@ -163,7 +163,7 @@ Template['popupWindows_sendTransactionConfirmation'].helpers({

Template['popupWindows_sendTransactionConfirmation'].events({
/**
Gets the new provided gas in ether amount and calculates the resulting providedGas
Gets the new provided gas in expanse amount and calculates the resulting providedGas
@event change .provided-gas, input .provided-gas
*/
Expand Down
10 changes: 5 additions & 5 deletions main.js
Expand Up @@ -167,7 +167,7 @@ app.on('before-quit', function(event){
if(!killedSockets)
event.preventDefault();

// CLEAR open IPC sockets to geth
// CLEAR open IPC sockets to gexp
_.each(global.sockets, function(socket){
if(socket) {
log.info('Closing socket', socket.id);
Expand Down Expand Up @@ -204,7 +204,7 @@ app.on('before-quit', function(event){
// }

var appStartWindow;
var nodeType = 'geth';
var nodeType = 'gexp';
var logFunction = function(data) {
data = data.toString().replace(/[\r\n]+/,'');
log.trace('NODE LOG:', data);
Expand Down Expand Up @@ -346,7 +346,7 @@ app.on('ready', function() {
appStartWindow.webContents.on('did-finish-load', function() {


// START GETH
// START gexp
const checkNodeSync = require('./modules/checkNodeSync.js');
const net = require('net');
const socket = new net.Socket();
Expand All @@ -363,7 +363,7 @@ app.on('ready', function() {
socket.on('error', function(e){
log.debug('Gexp connection REFUSED', count);

// if no geth is running, try starting your own
// if no gexp is running, try starting your own
if(count === 0) {
count++;

Expand Down Expand Up @@ -489,7 +489,7 @@ app.on('ready', function() {
var geth = !!global.nodes.geth;

ethereumNodes.stopNodes(function(){
ethereumNodes.startNode(geth ? 'geth' : 'eth', testnet, function(){
ethereumNodes.startNode(geth ? 'gexp' : 'exp', testnet, function(){
log.info('Changed to ', (testnet ? 'testnet' : 'mainnet'));
appMenu();
});
Expand Down
34 changes: 17 additions & 17 deletions modules/ethereumNodes.js
Expand Up @@ -23,7 +23,7 @@ module.exports = {

var node = global.nodes.geth || global.nodes.eth;

// kill running geth
// kill running gexp
if(node) {
node.stderr.removeAllListeners('data');
node.stdout.removeAllListeners('data');
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = {
Starts a node of type
@method startNode
@param {String} type the node e.g. "geth" or "eth"
@param {String} type the node e.g. "gexp" or "exp"
@param {Boolean} testnet
@param {Function} callback will be called after successfull start
*/
Expand All @@ -70,7 +70,7 @@ module.exports = {

log.info('Start node from '+ binPath);

if(type === 'eth') {
if(type === 'exp') {

var modalWindow = popupWindow.show('unlockMasterPassword', {width: 400, height: 220, alwaysOnTop: true}, null, null, true);
modalWindow.on('closed', function() {
Expand Down Expand Up @@ -175,11 +175,11 @@ module.exports = {

// START TESTNET
if(testnet) {
args = (type === 'geth') ? ['--testnet', '--fast'] : ['--morden', '--unsafe-transactions'];
args = (type === 'gexp') ? ['--testnet', '--fast'] : ['--morden', '--unsafe-transactions'];

// START MAINNET
} else {
args = (type === 'geth') ? ['--fast', '--cache','512'] : ['--unsafe-transactions', '--master', pw];
args = (type === 'gexp') ? ['--fast', '--cache','512'] : ['--unsafe-transactions', '--master', pw];
pw = null;
}

Expand All @@ -196,9 +196,9 @@ module.exports = {
if(popupCallback) {
popupCallback('noBinary');

// set default to geth, to prevent beeing unable to start the wallet
if(type === 'eth')
_this._writeNodeToFile('geth', testnet);
// set default to gexp, to prevent beeing unable to start the wallet
if(type === 'exp')
_this._writeNodeToFile('gexp', testnet);
}
}
});
Expand All @@ -207,13 +207,13 @@ module.exports = {
global.nodes[type].once('exit',function(){

// If is eth then the password was typed wrong
if(!cbCalled && type === 'eth') {
if(!cbCalled && type === 'exp') {

if(popupCallback)
popupCallback('passwordWrong');

// set default to geth, to prevent beeing unable to start the wallet
_this._writeNodeToFile('geth', testnet);
// set default to gexp, to prevent beeing unable to start the wallet
_this._writeNodeToFile('gexp', testnet);

log.warn('Password wrong '+ type +' node!');
}
Expand All @@ -224,8 +224,8 @@ module.exports = {

if(!cbCalled && _.isFunction(callback)){

// (eth) prevent starting, when "Ethereum (++)" didn't appear yet (necessary for the master pw unlock)
if(type === 'eth' && data.toString().indexOf('Ethereum (++)') === -1)
// (exp) prevent starting, when "Expanse (++)" didn't appear yet (necessary for the master pw unlock)
if(type === 'exp' && data.toString().indexOf('Expanse (++)') === -1)
return;
else if(popupCallback)
popupCallback(null);
Expand All @@ -237,15 +237,15 @@ module.exports = {
global.nodes[type].stderr.pipe(logFile);
global.nodes[type].stderr.on('data', function(data) {

// dont react on stderr when eth++
if(type === 'eth')
// dont react on stderr when exp++
if(type === 'exp')
return;

// console.log('stderr ', data.toString());
if(!cbCalled && _.isFunction(callback)) {

// (geth) prevent starying until IPC service is started
if(type === 'geth' && data.toString().indexOf('IPC service started') === -1)
// (gexp) prevent starying until IPC service is started
if(type === 'gexp' && data.toString().indexOf('IPC service started') === -1)
return;

callCb(null);
Expand Down
2 changes: 1 addition & 1 deletion modules/ipc/ipcProviderBackend.js
@@ -1,5 +1,5 @@
/**
The IPC provider backend filter and tunnel all incoming request to the IPC geth bridge.
The IPC provider backend filter and tunnel all incoming request to the IPC gexp bridge.
@module ipcProviderBackend
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/ipc/ipcProviderWrapper.js
Expand Up @@ -25,7 +25,7 @@ ipcProviderWrapper = {
writable: false,

/**
Connects the IPC on the backend to the geth node
Connects the IPC on the backend to the gexp node
Note: web3.isConnected will always return true, as otherwise race conditions can occour,
letting it look like youre not connected via IPC.
Expand Down
4 changes: 2 additions & 2 deletions modules/ipcCommunicator.js
Expand Up @@ -88,11 +88,11 @@ ipc.on('backendAction_importPresaleFile', function(e, path, pw) {
var error = false;

// start import process
var nodeProcess = spawn(getNodePath('geth'), ['wallet', 'import', path]);
var nodeProcess = spawn(getNodePath('gexp'), ['wallet', 'import', path]);

nodeProcess.once('error',function(){
error = true;
e.sender.send('uiAction_importedPresaleFile', 'Couldn\'t start the "geth wallet import <file.json>" process.');
e.sender.send('uiAction_importedPresaleFile', 'Couldn\'t start the "gexp wallet import <file.json>" process.');
});
nodeProcess.stdout.on('data', function(data) {
var data = data.toString();
Expand Down
12 changes: 6 additions & 6 deletions modules/menuItems.js
Expand Up @@ -90,7 +90,7 @@ var menuTempl = function(webviews) {
else
path += '/.web3/keys';

// geth
// gexp
} else {
if(process.platform === 'darwin')
path += '/Library/Expanse/keystore';
Expand Down Expand Up @@ -265,7 +265,7 @@ var menuTempl = function(webviews) {
click: function(){
ethereumNodes.stopNodes(function(){
popupWindow.loadingWindow.show();
ethereumNodes.startNode('geth', false, function(){
ethereumNodes.startNode('gexp', false, function(){
popupWindow.loadingWindow.hide();
global.mainWindow.loadURL(global.interfaceAppUrl);
createMenu(webviews);
Expand All @@ -274,14 +274,14 @@ var menuTempl = function(webviews) {
}
},
{
label: 'Eth 1.2.4 (C++) [experimental!]',
label: 'Exp 1.2.4 (C++) [experimental!]',
checked: !!global.nodes.eth,
enabled: !!((global.nodes.geth || global.nodes.eth) && !global.nodes.eth),
type: 'checkbox',
click: function(){
ethereumNodes.stopNodes(function(){
popupWindow.loadingWindow.show();
ethereumNodes.startNode('eth', false, function(){
ethereumNodes.startNode('exp', false, function(){
popupWindow.loadingWindow.hide();
global.mainWindow.loadURL(global.interfaceAppUrl);
createMenu(webviews);
Expand All @@ -307,7 +307,7 @@ var menuTempl = function(webviews) {

ethereumNodes.stopNodes(function(){
popupWindow.loadingWindow.show();
ethereumNodes.startNode(geth ? 'geth' : 'eth', false, function(){
ethereumNodes.startNode(geth ? 'gexp' : 'exp', false, function(){
popupWindow.loadingWindow.hide();
global.mainWindow.loadURL(global.interfaceAppUrl);
createMenu(webviews);
Expand All @@ -326,7 +326,7 @@ var menuTempl = function(webviews) {

ethereumNodes.stopNodes(function(){
popupWindow.loadingWindow.show();
ethereumNodes.startNode(geth ? 'geth' : 'eth', true, function(){
ethereumNodes.startNode(geth ? 'gexp' : 'exp', true, function(){
popupWindow.loadingWindow.hide();
global.mainWindow.loadURL(global.interfaceAppUrl);
createMenu(webviews);
Expand Down

0 comments on commit c503deb

Please sign in to comment.