Extract consts for WITNESS_V0 hash sizes

This commit is contained in:
Ben Woosley
2018-04-10 20:13:32 -07:00
parent 0a8054e7cd
commit 3450a9b25c
4 changed files with 11 additions and 7 deletions

View File

@@ -129,6 +129,10 @@ enum class SigVersion
WITNESS_V0 = 1,
};
/** Signature hash sizes */
static constexpr size_t WITNESS_V0_SCRIPTHASH_SIZE = 32;
static constexpr size_t WITNESS_V0_KEYHASH_SIZE = 20;
uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = nullptr);
class BaseSignatureChecker