diff options
| author | Forrest Voight <[email protected]> | 2013-01-03 23:58:36 -0500 |
|---|---|---|
| committer | Forrest Voight <[email protected]> | 2013-01-03 23:58:40 -0500 |
| commit | f3d872d1eabeb5c999162f709626ee20c8789c42 (patch) | |
| tree | 11595906474f239d434c6d80f51d8d2a57ded751 /src/rpcmining.cpp | |
| parent | use fee/sigop data in BlockTemplate struct instead of (not always correctly) ... (diff) | |
| download | discoin-f3d872d1eabeb5c999162f709626ee20c8789c42.tar.xz discoin-f3d872d1eabeb5c999162f709626ee20c8789c42.zip | |
moved "index_in_template" to a separate variable to clarify what it is
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 47ca13528..778e0acbd 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); } |