don't enforce standardness on coinbase

This commit is contained in:
Gregory Sanders 2018-03-13 11:59:44 -04:00
parent aa876a8762
commit b8ba4ebee7

View file

@ -377,6 +377,7 @@ UniValue testproposedblock(const JSONRPCRequest& request)
if ((!request.params[1].isNull() && !request.params[1].get_bool()) ||
(request.params[1].isNull() && !GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard()))) {
for (auto& transaction : block.vtx) {
if (transaction->IsCoinBase()) continue;
std::string reason;
if (!IsStandardTx(*transaction, reason)) {
throw JSONRPCError(RPC_VERIFY_ERROR, "Block proposal included a non-standard transaction: " + reason);