Identify and display mining pool.

fixes #59
This commit is contained in:
softsimon
2020-05-10 00:35:21 +07:00
parent 1feb985bec
commit 0753b11840
12 changed files with 101 additions and 6 deletions

21
frontend/sync-assets.js Normal file
View File

@@ -0,0 +1,21 @@
var https = require('https');
var fs = require('fs');
var PATH = 'dist/mempool/resources/';
if (process.argv[2] && process.argv[2] === 'dev') {
PATH = 'src/resources/';
}
function download(filename, url) {
var file = fs.createWriteStream(filename);
https.get(url, function(response) {
response.pipe(file);
});
}
console.log('Downloading assets');
download(PATH + 'assets.json', 'https://raw.githubusercontent.com/Blockstream/asset_registry_db/master/index.json');
console.log('Downloading assets minimal');
download(PATH + 'assets.minimal.json', 'https://raw.githubusercontent.com/Blockstream/asset_registry_db/master/index.minimal.json');
console.log('Downloading mining pools info');
download(PATH + 'pools.json', 'https://raw.githubusercontent.com/btccom/Blockchain-Known-Pools/master/pools.json');