refactor: Use empty() over eof() in the streams interface

End-of-file does not really make sense for streams that wrap buffers. So
replace it by the equivalent empty() checks.
This commit is contained in:
MarcoFalke
2026-02-02 17:56:13 +01:00
parent fa879db735
commit fa20bc2ec2
5 changed files with 4 additions and 5 deletions

View File

@@ -377,7 +377,7 @@ bool LoadCryptedKey(CWallet* pwallet, DataStream& ssKey, DataStream& ssValue, st
// Get the checksum and check it
bool checksum_valid = false;
if (!ssValue.eof()) {
if (!ssValue.empty()) {
uint256 checksum;
ssValue >> checksum;
if (!(checksum_valid = Hash(vchPrivKey) == checksum)) {