aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionrecord.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-09-06 04:21:45 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-09-06 04:21:45 -0700
commit495242c1adff8832d7d30b920aa71f31dd63a2a6 (patch)
tree68fc6fb4f9c04f80a94dc4100d66e9245d64a0da /src/qt/transactionrecord.cpp
parent9d6b60cf50ffcf2cd35659afa1a7f5dd5bfa06e3 (diff)
parented4c7fd4fdc1f5b89162d9e91ad57d16205b06eb (diff)
Merge pull request #2976 from laanwj/2013_09_txid_details
qt: add vout index to transaction id in transactions details dialog
Diffstat (limited to 'src/qt/transactionrecord.cpp')
-rw-r--r--src/qt/transactionrecord.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index e954508769..ea2c1f0a5c 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -224,8 +224,13 @@ bool TransactionRecord::statusUpdateNeeded()
return status.cur_num_blocks != nBestHeight;
}
-std::string TransactionRecord::getTxID()
+QString TransactionRecord::getTxID() const
{
- return hash.ToString() + strprintf("-%03d", idx);
+ return formatSubTxId(hash, idx);
+}
+
+QString TransactionRecord::formatSubTxId(const uint256 &hash, int vout)
+{
+ return QString::fromStdString(hash.ToString() + strprintf("-%03d", vout));
}