mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
qa: Add getrawtransaction in_active_chain=False test
This commit is contained in:
@@ -155,14 +155,12 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
|
||||
if (!request.params[2].isNull()) {
|
||||
uint256 blockhash = ParseHashV(request.params[2], "parameter 3");
|
||||
if (!blockhash.IsNull()) {
|
||||
BlockMap::iterator it = mapBlockIndex.find(blockhash);
|
||||
if (it == mapBlockIndex.end()) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block hash not found");
|
||||
}
|
||||
blockindex = it->second;
|
||||
in_active_chain = chainActive.Contains(blockindex);
|
||||
BlockMap::iterator it = mapBlockIndex.find(blockhash);
|
||||
if (it == mapBlockIndex.end()) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block hash not found");
|
||||
}
|
||||
blockindex = it->second;
|
||||
in_active_chain = chainActive.Contains(blockindex);
|
||||
}
|
||||
|
||||
CTransactionRef tx;
|
||||
|
||||
Reference in New Issue
Block a user