diff options
Diffstat (limited to 'src/test/checkblock_tests.cpp')
| -rw-r--r-- | src/test/checkblock_tests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp index fdea12846..a4121caa8 100644 --- a/src/test/checkblock_tests.cpp +++ b/src/test/checkblock_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2013-2014 The Bitcoin Core developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // @@ -8,6 +8,7 @@ +#include "clientversion.h" #include "main.h" #include "utiltime.h" @@ -35,8 +36,8 @@ bool read_block(const std::string& filename, CBlock& block) fseek(fp, 8, SEEK_SET); // skip msgheader/size - CAutoFile filein = CAutoFile(fp, SER_DISK, CLIENT_VERSION); - if (!filein) return false; + CAutoFile filein(fp, SER_DISK, CLIENT_VERSION); + if (filein.IsNull()) return false; filein >> block; |