Publish Nerbus source snapshot and build documentation
This commit is contained in:
commit
76cccceca7
198 files changed
+338574
No files matched your search
@@ -0,0 +1,13 @@
|
||||
// Read-only preflight: indexing never starts a coin daemon or mines blocks.
|
||||
const settings = require('../lib/settings');
|
||||
const Client = require('../lib/node').Client;
|
||||
const client = new Client({...settings.wallet,timeout:3000});
|
||||
client.cmd([{method:'getblockhash',params:[0]}], (err, genesis)=>{
|
||||
if(err) { console.log('NRB node offline; index remains idle'); process.exit(0); }
|
||||
if(genesis !== settings.block_page.genesis_block) {
|
||||
console.error('Refusing to index an unexpected blockchain'); process.exit(1);
|
||||
}
|
||||
const child=require('child_process').spawn(process.execPath,['scripts/sync.js','index','update'],{stdio:'inherit'});
|
||||
child.on('error',()=>process.exit(1));
|
||||
child.on('exit',code=>process.exit(code==null?1:code));
|
||||
});
|
||||
Reference in new issue
Block a user