diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-09-12 13:01:07 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-09-12 22:49:49 +0200 |
commit | 9be330b654cfbd792620295f3867f592059d6a7a (patch) | |
tree | d1596eed457af928c181b2332c292d1c7a982b85 /src/validation.cpp | |
parent | 37e2b011136ca1cf00dfb9e575d12f0d035a6a2c (diff) | |
download | bitcoin-9be330b654cfbd792620295f3867f592059d6a7a.tar.xz |
[refactor] Define MessageStartChars as std::array
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index e3a00e4241..4bb648d1e5 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4533,11 +4533,11 @@ void ChainstateManager::LoadExternalBlockFile( unsigned int nSize = 0; try { // locate a header - unsigned char buf[CMessageHeader::MESSAGE_START_SIZE]; + CMessageHeader::MessageStartChars buf; blkdat.FindByte(std::byte(params.MessageStart()[0])); nRewind = blkdat.GetPos() + 1; blkdat >> buf; - if (memcmp(buf, params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE)) { + if (buf != params.MessageStart()) { continue; } // read size |