mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-09 03:07:25 -04:00
SimpleMode: automatic public nodes discovering and switching
This commit is contained in:
10
js/Utils.js
10
js/Utils.js
@@ -94,16 +94,6 @@ function netTypeToString(){
|
||||
return nettype == 1 ? qsTr("Testnet") : nettype == 2 ? qsTr("Stagenet") : qsTr("Mainnet");
|
||||
}
|
||||
|
||||
function randomChoice(arr){
|
||||
return arr[Math.floor(Math.random() * arr.length)];
|
||||
}
|
||||
|
||||
function filterNodes(nodes, port) {
|
||||
if(typeof data === 'number')
|
||||
port = port.toString();
|
||||
return nodes.filter(function(_){return _.indexOf(port) !== -1});
|
||||
}
|
||||
|
||||
function epoch(){
|
||||
return Math.floor((new Date).getTime()/1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user