ensure we don't return witness data in the transaction w/o segwit rule
This commit is contained in:
parent
e5f049e5ed
commit
1bbedef565
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
|||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 17)
|
||||
define(_CLIENT_VERSION_REVISION, 3)
|
||||
define(_CLIENT_VERSION_BUILD, 1)
|
||||
define(_CLIENT_VERSION_BUILD, 2)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2019)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
|
|
|
@ -451,7 +451,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
|||
if (strMode != "template")
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
|
||||
|
||||
if (Params().NetworkIDString() != CBaseChainParams::REGTEST) // who should own this constant?
|
||||
if (Params().NetworkIDString() == CBaseChainParams::MAIN)
|
||||
{
|
||||
if (!g_connman)
|
||||
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
|
||||
|
@ -585,7 +585,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
|||
|
||||
UniValue entry(UniValue::VOBJ);
|
||||
|
||||
entry.pushKV("data", EncodeHexTx(tx));
|
||||
entry.pushKV("data", EncodeHexTx(tx, fSupportsSegwit ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS));
|
||||
entry.pushKV("txid", txHash.GetHex());
|
||||
entry.pushKV("hash", tx.GetWitnessHash().GetHex());
|
||||
|
||||
|
|
Loading…
Reference in a new issue