Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Light client bindings on Mist/Wallet (#3052)
Browse files Browse the repository at this point in the history
* Removing eth path resolver

* Geth 1.7.0 update

* Enabling some Light client bindings on mist

* Light client option on the menu

* ESLint fixes

* Block time display null state

* Removing nonsense loc

* Code style

* Enabling light/fast switch from the menu

* Syncmode cli option

* Fixing minerthreads flag case

* Improving debug messages

* Removing legacy code; Code style

* Simplifying mining menu option

* Several changes on menu

* Syncmode param adjustments

* Light client menu fine tuning

* Fixing enabled/checked menu option

* Adding checkbox
  • Loading branch information
evertonfraga committed Sep 26, 2017
1 parent e40d7ae commit 8688a18
Show file tree
Hide file tree
Showing 18 changed files with 188 additions and 126 deletions.
33 changes: 19 additions & 14 deletions interface/client/templates/elements/nodeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ Template['elements_nodeInfo'].onCreated(function(){
});


Template['elements_nodeInfo'].onDestroyed(function(){
Template['elements_nodeInfo'].onDestroyed(function() {
Meteor.clearInterval(this.peerCountIntervalId);

if(this.syncFilter)
if (this.syncFilter) {
this.syncFilter.stopWatching();
}
});


Expand All @@ -120,28 +121,32 @@ Template['elements_nodeInfo'].helpers({
@method (formattedBlockNumber)
@return {String}
*/
'formattedBlockNumber': function() {
formattedBlockNumber: function () {
return numeral(EthBlocks.latest.number).format('0,0');
},
/**
Formats the time since the last block
@method (timeSinceBlock)
*/
'timeSinceBlock': function () {
var timeSince = moment(EthBlocks.latest.timestamp, "X");
timeSinceBlock: function () {
var timeSince = moment(EthBlocks.latest.timestamp, 'X');
var now = moment();
var diff = now.diff(timeSince, "seconds");
var diff = now.diff(timeSince, 'seconds');

if (!EthBlocks.latest.timestamp) {
return '-';
}

if (diff>60) {
Helpers.rerun["10s"].tick();
if (diff > 60) {
Helpers.rerun['10s'].tick();
return timeSince.fromNow(true);
} else if (diff<2) {
Helpers.rerun["1s"].tick();
return ' <span class="blue">' + TAPi18n.__('mist.nodeInfo.blockReceivedShort') + '</span>'
} else {
Helpers.rerun["1s"].tick();
return diff + "s";
} else if (diff < 2) {
Helpers.rerun['1s'].tick();
return ' <span class="blue">' + TAPi18n.__('mist.nodeInfo.blockReceivedShort') + '</span>';
}

Helpers.rerun['1s'].tick();
return diff + 's';
}
});
2 changes: 1 addition & 1 deletion interface/i18n/mist.de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ethereumNode": "Ethereum Softwareknoten",
"network": "Netzwerk",
"mainNetwork": "Hauptnetzwerk",
"startMining": "⛏ Mining starten (nur auf Testnetz)",
"startMining": "⛏ Mining starten",
"stopMining": "⛏ Mining stoppen",
"externalNode": "externer Softwareknoten aktiv",
"nodeMode": "Chain herunterladen",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"nodeMode": "Chain download",
"fullNode": "Store full blockchain",
"lightNode": "Use light Node (experimental!)",
"startMining": "⛏ Start mining (Testnet only)",
"startMining": "⛏ Start mining",
"stopMining": "⛏ Stop mining"
},
"window": {
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.es.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Nodo de Ethereum",
"network": "Red",
"mainNetwork": "Red principal",
"startMining": "⛏ Empezar a minar (sólo Testnet)",
"startMining": "⛏ Empezar a minar",
"stopMining": "⛏ Parar de minar",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.fa.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ethereumNode": "Ethereum Node",
"network": "Network",
"mainNetwork": "Main Network",
"startMining": "⛏ Start Mining (Testnet only)",
"startMining": "⛏ Start Mining",
"stopMining": "⛏ Stop Mining",
"openRemix": "Open Remix IDE",
"nodeMode": "Chain download",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.fr.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Nœud Ethereum",
"network": "Réseau",
"mainNetwork": "Réseau principal",
"startMining": "⛏ Commencer à miner (seulement pour Testnet)",
"startMining": "⛏ Commencer à miner",
"stopMining": "⛏ Arrêter de miner",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.it.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Nodo Ethereum",
"network": "Rete",
"mainNetwork": "Rete principale",
"startMining": "⛏ Inizia mining (solo Testnet)",
"startMining": "⛏ Inizia mining",
"stopMining": "⛏ Ferma mining",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.ja.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Ethereum ノード",
"network": "ネットワーク",
"mainNetwork": "メインネットワーク",
"startMining": "⛏ マイニングを始める (テストネット のみ)",
"startMining": "⛏ マイニングを始める",
"stopMining": "⛏ マイニングを中止する",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.nb.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Ethereum Node",
"network": "Nettverk",
"mainNetwork": "Hovednettverk",
"startMining": "⛏ Start Mining (Kun testnett)",
"startMining": "⛏ Start Mining",
"stopMining": "⛏ Stopp Mining",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.nl.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"fullNode": "Bewaar volledige blockchain",
"lightNode": "Gebruik light Node (experimenteel!)",
"mainNetwork": "Hoofdnetwerk",
"startMining": "⛏ Start Mining (Alleen testnet)",
"startMining": "⛏ Start Mining",
"stopMining": "⛏ Stop Mining"
},
"window": {
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.pt.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ethereumNode": "Node",
"network": "Rede",
"mainNetwork": "Rede principal",
"startMining": "⛏ Iniciar mineração (somente em teste)",
"startMining": "⛏ Iniciar mineração",
"stopMining": "⛏ Parar mineração",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.ru.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ethereumNode": "Ethereum-нода",
"network": "Сеть",
"mainNetwork": "Основная сеть",
"startMining": "⛏ Запустить майнинг (только для тестовой сети)",
"startMining": "⛏ Запустить майнинг",
"stopMining": "⛏ Остановить майнинг",
"externalNode": "using external node",
"openRemix": "Open Remix IDE",
Expand Down
2 changes: 1 addition & 1 deletion interface/i18n/mist.sq.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"nodeMode": "Shkarkim zinxhir",
"fullNode": "Ruaj zinxhirin e plotë të blloqeve",
"lightNode": "Përdor nyje të lehtë (eksperimentale!)",
"startMining": "⛏ Fillo të Prodhosh (Rrjet testimi)",
"startMining": "⛏ Fillo të Prodhosh",
"stopMining": "⛏ Ndalo së Prodhuari"
},
"window": {
Expand Down
3 changes: 1 addition & 2 deletions modules/clientBinaryManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Manager extends EventEmitter {
// check every hour
setInterval(() => this._checkForNewConfig(true), 1000 * 60 * 60);

this._resolveEthBinPath();
return this._checkForNewConfig(restart);
}

Expand Down Expand Up @@ -73,7 +72,7 @@ class Manager extends EventEmitter {
log.warn('Error fetching client binaries config from repo', err);
})
.then((latestConfig) => {
if(!latestConfig) return;
if (!latestConfig) return;

let localConfig;
let skipedVersion;
Expand Down
Loading

0 comments on commit 8688a18

Please sign in to comment.