allow grabbing genesis transaction(s) when connected

This commit is contained in:
Gregory Sanders 2018-10-23 10:52:24 -04:00
parent c7e5549317
commit e532664298

View file

@ -147,7 +147,8 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
uint256 hash = ParseHashV(request.params[0], "parameter 1");
CBlockIndex* blockindex = nullptr;
if (hash == Params().GenesisBlock().hashMerkleRoot) {
if (!Params().GetConsensus().connect_genesis_outputs &&
hash == Params().GenesisBlock().hashMerkleRoot) {
// Special exception for the genesis block coinbase transaction
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "The genesis block coinbase is not considered an ordinary transaction and cannot be retrieved");
}