[BROKEN] Add CA validation

This commit is contained in:
Steven Roose 2019-03-19 20:39:56 +00:00
parent d53479c9ff
commit 0b5066143d
No known key found for this signature in database
GPG key ID: 7FC91380BB4CE800
23 changed files with 712 additions and 124 deletions

View file

@ -55,6 +55,7 @@ const char* GetTxnOutputType(txnouttype t)
case TX_WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
case TX_WITNESS_UNKNOWN: return "witness_unknown";
case TX_TRUE: return "true";
case TX_FEE: return "fee";
}
return nullptr;
}
@ -113,6 +114,11 @@ txnouttype Solver(const CScript& scriptPubKey, std::vector<std::vector<unsigned
return TX_TRUE;
}
// Fee outputs are for elements-style transactions only
if (g_con_elementsmode && scriptPubKey == CScript()) {
return TX_FEE;
}
// Shortcut for pay-to-script-hash, which are more constrained than the other types:
// it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
if (scriptPubKey.IsPayToScriptHash())