diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 30fafd90..c3f3e544 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -1788,7 +1788,12 @@ RPC.prototype.sendRawTransaction = async function sendRawTransaction(args, help) const tx = TX.fromRaw(data); - this.node.relay(tx); + var response + try { + response = await this.node.sendTX(tx); + } catch(e) { + throw e + } return tx.txid(); }; diff --git a/lib/node/fullnode.js b/lib/node/fullnode.js index 7d07755d..0cad4e8d 100644 --- a/lib/node/fullnode.js +++ b/lib/node/fullnode.js @@ -298,13 +298,13 @@ FullNode.prototype.sendTX = async function sendTX(tx) { try { missing = await this.mempool.addTX(tx); } catch (err) { - if (err.type === 'VerifyError' && err.score === 0) { - this.error(err); - this.logger.warning('Verification failed for tx: %s.', tx.txid()); - this.logger.warning('Attempting to broadcast anyway...'); - this.broadcast(tx); - return; - } + // if (err.type === 'VerifyError' && err.score === 0) { + // this.error(err); + // this.logger.warning('Verification failed for tx: %s.', tx.txid()); + // this.logger.warning('Attempting to broadcast anyway...'); + // this.broadcast(tx); + // return; + // } throw err; }