From a2597a43254acd8150497049142439334b8c0b1e Mon Sep 17 00:00:00 2001 From: Jeremiah Buddenhagen Date: Wed, 3 Jan 2018 01:02:07 -0600 Subject: [PATCH] Add tx-comment to JSON responses --- src/core_write.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core_write.cpp b/src/core_write.cpp index 1431fa0c9..72211f06b 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -204,6 +204,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, } entry.pushKV("vout", vout); + if (tx.nVersion >= 2) { + entry.pushKV("tx-comment", tx.strTxComment); + } + if (!hashBlock.IsNull()) entry.pushKV("blockhash", hashBlock.GetHex());