mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Make Hash[160] consume range-like objects
This commit is contained in:
@@ -630,13 +630,13 @@ static size_t CalculateNestedKeyhashInputSize(bool use_max_sig)
|
||||
CPubKey pubkey = key.GetPubKey();
|
||||
|
||||
// Generate pubkey hash
|
||||
uint160 key_hash(Hash160(pubkey.begin(), pubkey.end()));
|
||||
uint160 key_hash(Hash160(pubkey));
|
||||
|
||||
// Create inner-script to enter into keystore. Key hash can't be 0...
|
||||
CScript inner_script = CScript() << OP_0 << std::vector<unsigned char>(key_hash.begin(), key_hash.end());
|
||||
|
||||
// Create outer P2SH script for the output
|
||||
uint160 script_id(Hash160(inner_script.begin(), inner_script.end()));
|
||||
uint160 script_id(Hash160(inner_script));
|
||||
CScript script_pubkey = CScript() << OP_HASH160 << std::vector<unsigned char>(script_id.begin(), script_id.end()) << OP_EQUAL;
|
||||
|
||||
// Add inner-script to key store and key to watchonly
|
||||
|
||||
Reference in New Issue
Block a user