http: fix broadcast call.
This commit is contained in:
parent
33c4ede940
commit
8b74d95280
@ -316,9 +316,15 @@ HTTPServer.prototype.initRouter = function initRouter() {
|
||||
// Broadcast TX
|
||||
this.post('/broadcast', async function(req, res) {
|
||||
var valid = req.valid();
|
||||
var tx = valid.buf('tx');
|
||||
enforce(tx, 'TX is required.');
|
||||
var raw = valid.buf('tx');
|
||||
var tx;
|
||||
|
||||
enforce(raw, 'TX is required.');
|
||||
|
||||
tx = TX.fromRaw(raw);
|
||||
|
||||
await this.node.sendTX(tx);
|
||||
|
||||
res.send(200, { success: true });
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user