mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 21:15:47 +00:00
Tweak to parse_options
This commit is contained in:
@@ -2,7 +2,7 @@ var fs = require('fs');
|
||||
var Ledger = require('../src/js/ripple/ledger').Ledger;
|
||||
|
||||
function parse_options(from, flags) {
|
||||
var argv = from.slice(2), // remove `node` and `this.js`
|
||||
var argv = from.slice(),
|
||||
opts = {argv:argv};
|
||||
|
||||
flags.forEach(function(f) {
|
||||
@@ -20,7 +20,8 @@ function parse_options(from, flags) {
|
||||
return opts;
|
||||
}
|
||||
|
||||
var opts = parse_options(process.argv, ['sanity-test']);
|
||||
var opts = parse_options(process.argv.slice(2), // remove `node` and `this.js`
|
||||
['sanity-test']);
|
||||
|
||||
if (opts.argv.length < 1) {
|
||||
console.error("Usage: scripts/verify_ledger_json path/to/ledger.json");
|
||||
@@ -34,7 +35,6 @@ var ledger = Ledger.from_json(JSON.parse(json));
|
||||
// This will serialize each accountState object to binary and then back to json
|
||||
// before finally serializing for hashing. This is mostly to expose any issues
|
||||
// with ripple-libs binary <--> json codecs.
|
||||
|
||||
if (opts.sanity_test) {
|
||||
console.log("All accountState nodes will be processed from " +
|
||||
"json->binary->json->binary. This may take some time " +
|
||||
|
||||
Reference in New Issue
Block a user