aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-31 18:04:44 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-05 10:13:25 +0200
commitfac81affb527132945773a5315bd27fec61ec52f (patch)
tree90aa401bd50bf12519a45737f335856256ff614e /src/hash.h
parentfaec591d64e40ba7ec7656cbfdda1a05953bde13 (diff)
Use serialization parameters for CAddress serialization
This also cleans up the addrman (de)serialization code paths to only allow `Disk` serialization. Some unit tests previously forced a `Network` serialization, which does not make sense, because Bitcoin Core in production will always `Disk` serialize. This cleanup idea was suggested by Pieter Wuille and implemented by Anthony Towns. Co-authored-by: Pieter Wuille <pieter@wuille.net> Co-authored-by: Anthony Towns <aj@erisian.com.au>
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.h b/src/hash.h
index 89c6f0dab9..7c9b3fa06d 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -234,18 +234,18 @@ public:
/** Writes data to an underlying source stream, while hashing the written data. */
template <typename Source>
-class HashedSourceWriter : public CHashWriter
+class HashedSourceWriter : public HashWriter
{
private:
Source& m_source;
public:
- explicit HashedSourceWriter(Source& source LIFETIMEBOUND) : CHashWriter{source.GetType(), source.GetVersion()}, m_source{source} {}
+ explicit HashedSourceWriter(Source& source LIFETIMEBOUND) : HashWriter{}, m_source{source} {}
void write(Span<const std::byte> src)
{
m_source.write(src);
- CHashWriter::write(src);
+ HashWriter::write(src);
}
template <typename T>