mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Make signature cache store CPubKeys
This commit is contained in:
committed by
Pieter Wuille
parent
dfa23b94c2
commit
896185d7ed
@@ -84,7 +84,7 @@ public:
|
||||
Set(vch.begin(), vch.end());
|
||||
}
|
||||
|
||||
// Simply read-only vector-like interface to the pubkey data.
|
||||
// Simple read-only vector-like interface to the pubkey data.
|
||||
unsigned int size() const { return GetLen(vch[0]); }
|
||||
const unsigned char *begin() const { return vch; }
|
||||
const unsigned char *end() const { return vch+size(); }
|
||||
@@ -109,12 +109,11 @@ public:
|
||||
}
|
||||
template<typename Stream> void Serialize(Stream &s, int nType, int nVersion) const {
|
||||
unsigned int len = size();
|
||||
::Serialize(s, VARINT(len), nType, nVersion);
|
||||
::WriteCompactSize(s, len);
|
||||
s.write((char*)vch, len);
|
||||
}
|
||||
template<typename Stream> void Unserialize(Stream &s, int nType, int nVersion) {
|
||||
unsigned int len;
|
||||
::Unserialize(s, VARINT(len), nType, nVersion);
|
||||
unsigned int len = ::ReadCompactSize(s);
|
||||
if (len <= 65) {
|
||||
s.read((char*)vch, len);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user