|
22 | 22 | #include "keepass.h"
|
23 | 23 | #include "privatesend-client.h"
|
24 | 24 |
|
| 25 | +#include "llmq/quorums_chainlocks.h" |
| 26 | + |
25 | 27 | #include <stdint.h>
|
26 | 28 |
|
27 | 29 | #include <boost/assign/list_of.hpp>
|
@@ -62,8 +64,10 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry)
|
62 | 64 | {
|
63 | 65 | int confirms = wtx.GetDepthInMainChain();
|
64 | 66 | bool fLocked = instantsend.IsLockedInstantSendTransaction(wtx.GetHash());
|
| 67 | + bool chainlock = llmq::chainLocksHandler->HasChainLock(wtx.nIndex, wtx.hashBlock); |
65 | 68 | entry.push_back(Pair("confirmations", confirms));
|
66 | 69 | entry.push_back(Pair("instantlock", fLocked));
|
| 70 | + entry.push_back(Pair("chainlock", chainlock)); |
67 | 71 | if (wtx.IsCoinBase())
|
68 | 72 | entry.push_back(Pair("generated", true));
|
69 | 73 | if (confirms > 0)
|
@@ -1552,6 +1556,7 @@ UniValue listtransactions(const JSONRPCRequest& request)
|
1552 | 1556 | " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
|
1553 | 1557 | " 'send' category of transactions.\n"
|
1554 | 1558 | " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n"
|
| 1559 | + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" |
1555 | 1560 | " \"confirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n"
|
1556 | 1561 | " 'receive' category of transactions. Negative confirmations indicate the\n"
|
1557 | 1562 | " transation conflicts with the block chain\n"
|
@@ -1756,6 +1761,7 @@ UniValue listsinceblock(const JSONRPCRequest& request)
|
1756 | 1761 | " \"vout\" : n, (numeric) the vout value\n"
|
1757 | 1762 | " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the 'send' category of transactions.\n"
|
1758 | 1763 | " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n"
|
| 1764 | + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" |
1759 | 1765 | " \"confirmations\" : n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
1760 | 1766 | " When it's < 0, it means the transaction conflicted that many blocks ago.\n"
|
1761 | 1767 | " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
@@ -1858,6 +1864,7 @@ UniValue gettransaction(const JSONRPCRequest& request)
|
1858 | 1864 | " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
|
1859 | 1865 | " 'send' category of transactions.\n"
|
1860 | 1866 | " \"instantlock\" : true|false, (bool) Current transaction lock state\n"
|
| 1867 | + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" |
1861 | 1868 | " \"confirmations\" : n, (numeric) The number of blockchain confirmations\n"
|
1862 | 1869 | " \"blockhash\" : \"hash\", (string) The block hash\n"
|
1863 | 1870 | " \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n"
|
|
0 commit comments