From a9a0f638ebe792e62e6c66b3d04b42fe233170cb Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 14 Dec 2016 10:39:56 -0800 Subject: [PATCH] miner: failsafe for segwit. --- lib/mining/miner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mining/miner.js b/lib/mining/miner.js index a0d04e71..c107d2a8 100644 --- a/lib/mining/miner.js +++ b/lib/mining/miner.js @@ -431,6 +431,9 @@ Miner.prototype.build = function build(attempt) { if (!tx.isFinal(attempt.height, attempt.locktime)) continue; + if (!attempt.witness && tx.hasWitness()) + continue; + for (j = 0; j < tx.inputs.length; j++) { input = tx.inputs[j]; prev = input.prevout.hash;