Changeset View
Changeset View
Standalone View
Standalone View
src/pubkey.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | template <typename Stream> void Unserialize(Stream &s) { | ||||
while (len--) { | while (len--) { | ||||
s.read(&dummy, 1); | s.read(&dummy, 1); | ||||
} | } | ||||
Invalidate(); | Invalidate(); | ||||
} | } | ||||
} | } | ||||
//! Get the KeyID of this public key (hash of its serialization) | //! Get the KeyID of this public key (hash of its serialization) | ||||
CKeyID GetID() const { return CKeyID(Hash160(vch, vch + size())); } | CKeyID GetID() const { | ||||
return CKeyID(Hash160(MakeSpan(vch).first(size()))); | |||||
} | |||||
//! Get the 256-bit hash of this public key. | //! Get the 256-bit hash of this public key. | ||||
uint256 GetHash() const { return Hash(vch, vch + size()); } | uint256 GetHash() const { return Hash(MakeSpan(vch).first(size())); } | ||||
/* | /* | ||||
* Check syntactic correctness. | * Check syntactic correctness. | ||||
* | * | ||||
* Note that this is consensus critical as CheckSig() calls it! | * Note that this is consensus critical as CheckSig() calls it! | ||||
*/ | */ | ||||
bool IsValid() const { return size() > 0; } | bool IsValid() const { return size() > 0; } | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |