| 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 |
nothing calls this directly
no test coverage detected