mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Use spans of std::byte in serialize
This switches .read() and .write() to take spans of bytes.
This commit is contained in:
@@ -61,7 +61,7 @@ void CBloomFilter::insert(const COutPoint& outpoint)
|
||||
{
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << outpoint;
|
||||
insert(stream);
|
||||
insert(MakeUCharSpan(stream));
|
||||
}
|
||||
|
||||
bool CBloomFilter::contains(Span<const unsigned char> vKey) const
|
||||
@@ -82,7 +82,7 @@ bool CBloomFilter::contains(const COutPoint& outpoint) const
|
||||
{
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << outpoint;
|
||||
return contains(stream);
|
||||
return contains(MakeUCharSpan(stream));
|
||||
}
|
||||
|
||||
bool CBloomFilter::IsWithinSizeConstraints() const
|
||||
|
||||
Reference in New Issue
Block a user