aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 47ca13528f..778e0acbd2 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -307,8 +307,9 @@ Value getblocktemplate(const Array& params, bool fHelp)
}
entry.push_back(Pair("depends", deps));
- entry.push_back(Pair("fee", pblocktemplate->vTxFees[&tx - pblock->vtx.data()]));
- entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[&tx - pblock->vtx.data()]));
+ int index_in_template = &tx - pblock->vtx.data();
+ entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template]));
+ entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template]));
transactions.push_back(entry);
}