diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index aa5072250f2a9..4a8bdb078dd1d 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -267,6 +267,7 @@ UniValue getrawtransaction(const JSONRPCRequest& request) " \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n" " \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n" " \"instantlock\" : true|false, (bool) Current transaction lock state\n" + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" "}\n" "\nExamples:\n" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d464fb8b59672..63c714085b06b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -22,6 +22,8 @@ #include "keepass.h" #include "privatesend-client.h" +#include "llmq/quorums_chainlocks.h" + #include #include @@ -62,8 +64,10 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) { int confirms = wtx.GetDepthInMainChain(); bool fLocked = instantsend.IsLockedInstantSendTransaction(wtx.GetHash()); + bool chainlock = llmq::chainLocksHandler->HasChainLock(wtx.nIndex, wtx.hashBlock); entry.push_back(Pair("confirmations", confirms)); entry.push_back(Pair("instantlock", fLocked)); + entry.push_back(Pair("chainlock", chainlock)); if (wtx.IsCoinBase()) entry.push_back(Pair("generated", true)); if (confirms > 0) @@ -1552,6 +1556,7 @@ UniValue listtransactions(const JSONRPCRequest& request) " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n" " 'send' category of transactions.\n" " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n" + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" " \"confirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n" " 'receive' category of transactions. Negative confirmations indicate the\n" " transation conflicts with the block chain\n" @@ -1756,6 +1761,7 @@ UniValue listsinceblock(const JSONRPCRequest& request) " \"vout\" : n, (numeric) the vout value\n" " \"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" " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n" + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" " \"confirmations\" : n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n" " When it's < 0, it means the transaction conflicted that many blocks ago.\n" " \"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) " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n" " 'send' category of transactions.\n" " \"instantlock\" : true|false, (bool) Current transaction lock state\n" + " \"chainlock\" : true|false, (bool) The state of the corresponding block chainlock\n" " \"confirmations\" : n, (numeric) The number of blockchain confirmations\n" " \"blockhash\" : \"hash\", (string) The block hash\n" " \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n"