Skip to content

Commit e532664

Browse files
committed
allow grabbing genesis transaction(s) when connected
1 parent c7e5549 commit e532664

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
147147
uint256 hash = ParseHashV(request.params[0], "parameter 1");
148148
CBlockIndex* blockindex = nullptr;
149149

150-
if (hash == Params().GenesisBlock().hashMerkleRoot) {
150+
if (!Params().GetConsensus().connect_genesis_outputs &&
151+
hash == Params().GenesisBlock().hashMerkleRoot) {
151152
// Special exception for the genesis block coinbase transaction
152153
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "The genesis block coinbase is not considered an ordinary transaction and cannot be retrieved");
153154
}

0 commit comments

Comments
 (0)