From df4b07304b0a5535545e08ea1d575534e8828107 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 12 Dec 2016 05:11:19 -0800 Subject: [PATCH] rpc: fix getblocktemplate. --- lib/http/rpc.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 483616ee..d20ca21f 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -1551,13 +1551,13 @@ RPC.prototype.__template = co(function* _template(version, coinbase, rules) { var i, j, entry, tx, deps, input, dep, output, raw, rwhash; var template, name, deployment, state; - for (i = 0; i < block.items.length; i++) { - entry = block.items[i]; + for (i = 0; i < attempt.items.length; i++) { + entry = attempt.items[i]; txIndex[entry.hash] = i; } - for (i = 0; i < block.items.length; i++) { - entry = block.items[i]; + for (i = 0; i < attempt.items.length; i++) { + entry = attempt.items[i]; tx = entry.tx; deps = [];