mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge bitcoin/bitcoin#21969: refactor: Switch serialize to uint8_t (Bundle 1/2)
ffff0d0442refactor: Switch serialize to uint8_t (1/n) (MarcoFalke) Pull request description: Replace `char` -> `uint8_t` in serialization where a sign doesn't make sense (char might be signed/unsigned). ACKs for top commit: practicalswift: cr ACKffff0d0442: patch looks correct and commit hash is ffffresh (was bbbbadass) kristapsk: ACKffff0d0442Tree-SHA512: cda682280c21d37cc3a6abd62569732079b31d18df3f157aa28bed80bd6f9f29a7db5c133b1f57b3a8f8d5ba181a76e473763c6e26a2df6d9244813f56f893ee
This commit is contained in:
@@ -3048,7 +3048,7 @@ void CaptureMessage(const CAddress& addr, const std::string& msg_type, const Spa
|
||||
ser_writedata64(f, now.count());
|
||||
f.write(msg_type.data(), msg_type.length());
|
||||
for (auto i = msg_type.length(); i < CMessageHeader::COMMAND_SIZE; ++i) {
|
||||
f << '\0';
|
||||
f << uint8_t{'\0'};
|
||||
}
|
||||
uint32_t size = data.size();
|
||||
ser_writedata32(f, size);
|
||||
|
||||
Reference in New Issue
Block a user