mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Use DataStream where possible
This commit is contained in:
@@ -207,7 +207,7 @@ bool DecodeHexBlockHeader(CBlockHeader& header, const std::string& hex_header)
|
||||
if (!IsHex(hex_header)) return false;
|
||||
|
||||
const std::vector<unsigned char> header_data{ParseHex(hex_header)};
|
||||
CDataStream ser_header(header_data, SER_NETWORK, PROTOCOL_VERSION);
|
||||
DataStream ser_header{header_data};
|
||||
try {
|
||||
ser_header >> header;
|
||||
} catch (const std::exception&) {
|
||||
|
||||
Reference in New Issue
Block a user