diff options
| author | Ross Nicoll <[email protected]> | 2017-12-28 15:04:08 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 19:24:06 +0100 |
| commit | 1be681a1b97b686f838af90682a57f2030d26015 (patch) | |
| tree | b2795e4a1d35004dbfd84d49b07bc54413a2a9e1 /src/rpc/rawtransaction.cpp | |
| parent | Change BIP65/66 enforcement to match Dogecoin (#1403) (diff) | |
| download | discoin-1be681a1b97b686f838af90682a57f2030d26015.tar.xz discoin-1be681a1b97b686f838af90682a57f2030d26015.zip | |
Modify chain consensus parameters to be height aware (#1396)
* Modify chain consensus parameters to be height aware
* Correct implementation of simplified rewards in parameters
* Correct max money
* Use base block version in IsSuperMajority() instead of full version
* Correct mining of blocks in AuxPoW tests
* Add in missing pre-AuxPoW consensus checks
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
| -rw-r--r-- | src/rpc/rawtransaction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 0fabb9f5a..994057e20 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -219,7 +219,8 @@ UniValue getrawtransaction(const JSONRPCRequest& request) CTransactionRef tx; uint256 hashBlock; - if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true)) + // Dogecoin: Is this the best value for consensus height? + if (!GetTransaction(hash, tx, Params().GetConsensus(0), hashBlock, true)) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, std::string(fTxIndex ? "No such mempool or blockchain transaction" : "No such mempool transaction. Use -txindex to enable blockchain transaction queries") + ". Use gettransaction for wallet transactions."); @@ -290,7 +291,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request) if (pblockindex == NULL) { CTransactionRef tx; - if (!GetTransaction(oneTxid, tx, Params().GetConsensus(), hashBlock, false) || hashBlock.IsNull()) + if (!GetTransaction(oneTxid, tx, Params().GetConsensus(0), hashBlock, false) || hashBlock.IsNull()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not yet in block"); if (!mapBlockIndex.count(hashBlock)) throw JSONRPCError(RPC_INTERNAL_ERROR, "Transaction index corrupt"); @@ -298,7 +299,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request) } CBlock block; - if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus())) + if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus(pblockindex->nHeight))) throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk"); unsigned int ntxFound = 0; |