Skip to content
Permalink
Browse files

Create block_unlocker.js

  • Loading branch information...
Snipa22 committed Feb 4, 2018
1 parent 11b1aa0 commit 6de109d67a08a93cdd97738b3d638ec1b761761b
Showing with 19 additions and 0 deletions.
  1. +19 −0 debug_scripts/block_unlocker.js
@@ -0,0 +1,19 @@
"use strict";
let mysql = require("promise-mysql");
let fs = require("fs");
let argv = require('minimist')(process.argv.slice(2));
let config = fs.readFileSync("../config.json");
let coinConfig = fs.readFileSync("../coinConfig.json");
let protobuf = require('protocol-buffers');

global.support = require("../lib/support.js")();
global.config = JSON.parse(config);
global.mysql = mysql.createPool(global.config.mysql);
global.protos = protobuf(fs.readFileSync('../lib/data.proto'));
let comms;
comms = require('../lib/local_comms');
global.database = new comms();
global.database.initEnv();
global.database.unlockBlock(argv.blockHash);
console.log("Block "+argv.blockHash+" un-locked! Exiting!");
process.exit();

0 comments on commit 6de109d

Please sign in to comment.
You can’t perform that action at this time.