MCPcopy Create free account
hub / github.com/ElementsProject/elements / Unserialize

Method Unserialize

src/pubkey.h:148–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 }
147 template <typename Stream>
148 void Unserialize(Stream& s)
149 {
150 const unsigned int len(::ReadCompactSize(s));
151 if (len <= SIZE) {
152 s.read(AsWritableBytes(Span{vch, len}));
153 if (len != size()) {
154 Invalidate();
155 }
156 } else {
157 // invalid pubkey, skip available data
158 s.ignore(len);
159 Invalidate();
160 }
161 }
162
163 //! Get the KeyID of this public key (hash of its serialization)
164 CKeyID GetID() const

Callers

nothing calls this directly

Calls 5

ReadCompactSizeFunction · 0.85
AsWritableBytesFunction · 0.85
sizeFunction · 0.70
readMethod · 0.45
ignoreMethod · 0.45

Tested by

no test coverage detected