You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
653 B
29 lines
653 B
#!/usr/bin/env node
|
|
|
|
var _ = require('lodash');
|
|
var program = require('commander');
|
|
var Client = require('../lib/client');
|
|
var utils = require('./cli-utils');
|
|
program = utils.configureCommander(program);
|
|
|
|
program
|
|
.usage('[options] <txpid>')
|
|
.parse(process.argv);
|
|
|
|
var args = program.args;
|
|
if (!args[0])
|
|
program.help();
|
|
|
|
var txpid = args[0];
|
|
var client = utils.getClient(program);
|
|
|
|
client.getTxProposals({}, function(err, txps) {
|
|
utils.die(err);
|
|
|
|
var txp = utils.findOneTxProposal(txps, txpid);
|
|
client.broadcastTxProposal(txp, function(err, txid) {
|
|
utils.die(err);
|
|
console.log('Transaction Broadcasted: TXID: ' + x.txid);
|
|
|
|
});
|
|
});
|
|
|