mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Use only Span{} constructor for byte-like types where possible
This removes bloat that is not needed.
This commit is contained in:
@@ -2939,13 +2939,13 @@ void CaptureMessageToFile(const CAddress& addr,
|
||||
AutoFile f{fsbridge::fopen(path, "ab")};
|
||||
|
||||
ser_writedata64(f, now.count());
|
||||
f.write(MakeByteSpan(msg_type));
|
||||
f << Span{msg_type};
|
||||
for (auto i = msg_type.length(); i < CMessageHeader::COMMAND_SIZE; ++i) {
|
||||
f << uint8_t{'\0'};
|
||||
}
|
||||
uint32_t size = data.size();
|
||||
ser_writedata32(f, size);
|
||||
f.write(AsBytes(data));
|
||||
f << data;
|
||||
}
|
||||
|
||||
std::function<void(const CAddress& addr,
|
||||
|
||||
Reference in New Issue
Block a user