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 = [];