From 386ef622c0c432798b1ee87258aaa906f07b633d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 25 Feb 2017 18:22:22 -0800 Subject: [PATCH] rpc: only add wit-nonce if segwit is active (submitblock). --- lib/http/rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 4b3cfea6..6f6a5466 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -1467,7 +1467,7 @@ RPC.prototype.submitblock = co(function* submitblock(args) { block = Block.fromRaw(toString(args[0]), 'hex'); // Fix eloipool bug (witness nonce is not present). - if (block.getCommitmentHash()) { + if (this.chain.state.hasWitness() && block.getCommitmentHash()) { tx = block.txs[0]; if (!tx.hasWitness()) { this.logger.warning('Submitted block had no witness nonce.');