Skip to content

Commit 9d109d6

Browse files
authored
Add missing instantlock/instantlock_internal to getblock's verbosity=2 mode (#3067)
1 parent 0f088d0 commit 9d109d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rpc/blockchain.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,17 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
129129
result.push_back(Pair("version", block.nVersion));
130130
result.push_back(Pair("versionHex", strprintf("%08x", block.nVersion)));
131131
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
132+
bool chainLock = llmq::chainLocksHandler->HasChainLock(blockindex->nHeight, blockindex->GetBlockHash());
132133
UniValue txs(UniValue::VARR);
133134
for(const auto& tx : block.vtx)
134135
{
135136
if(txDetails)
136137
{
137138
UniValue objTx(UniValue::VOBJ);
138139
TxToUniv(*tx, uint256(), objTx);
140+
bool fLocked = llmq::quorumInstantSendManager->IsLocked(tx->GetHash());
141+
objTx.push_back(Pair("instantlock", fLocked || chainLock));
142+
objTx.push_back(Pair("instantlock_internal", fLocked));
139143
txs.push_back(objTx);
140144
}
141145
else
@@ -163,7 +167,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
163167
if (pnext)
164168
result.push_back(Pair("nextblockhash", pnext->GetBlockHash().GetHex()));
165169

166-
result.push_back(Pair("chainlock", llmq::chainLocksHandler->HasChainLock(blockindex->nHeight, blockindex->GetBlockHash())));
170+
result.push_back(Pair("chainlock", chainLock));
167171

168172
return result;
169173
}

0 commit comments

Comments
 (0)