mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-05 20:49:19 +01:00
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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user