diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index b9ebcb4001..fddda8b5f4 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -307,7 +307,7 @@ Value getblocktemplate(const Array& params, bool fHelp) } entry.push_back(Pair("depends", deps)); - int index_in_template = &tx - pblock->vtx.data(); + int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template]));