aboutsummaryrefslogtreecommitdiff
path: root/src/support/lockedpool.h
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2023-01-13 14:12:25 -0500
committerfanquake <fanquake@gmail.com>2023-02-20 17:15:37 +0000
commit07397cdedeffb4da0aedd454d4539d65a0204291 (patch)
treea1bf1b95dffc5fcf39c71f5b3c49e8d4f75deeef /src/support/lockedpool.h
parent91f83dbeb197fc0fff574d9e29b4560b1d236bec (diff)
addrdb: Only call Serialize() once
The previous logic would call it once for serializing into the filestream, and then again for serializing into the hasher. If AddrMan was changed in between these calls by another thread, the resulting peers.dat would be corrupt with non-matching checksum and data. Fix this by using HashedSourceWriter, which writes the data to the underlying stream and keeps track of the hash in one go. Github-Pull: #26909 Rebased-From: 5eabb61b2386d00e93e6bbb2f493a56d1b326ad9
Diffstat (limited to 'src/support/lockedpool.h')
0 files changed, 0 insertions, 0 deletions