aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-04-24 16:09:03 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-04-24 16:09:06 +0200
commit4765b8c11679aeb76efd9ce907a5c17661d4b018 (patch)
tree2148409fa63208e8f6b283c730331d5ef9b5393b /src
parent89bbd54fbfbb1b21257d436731868455821a101e (diff)
parent0caf2b187fb8831d622f601824eef8351faf1ce1 (diff)
Merge pull request #4087
0caf2b1 Add MESSAGE_START_SIZE from chainparams when loading blocks from external files. (Simon de la Rouviere)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a591168c07..7a6d4b39de 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3092,11 +3092,11 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
unsigned int nSize = 0;
try {
// locate a header
- unsigned char buf[4];
+ unsigned char buf[MESSAGE_START_SIZE];
blkdat.FindByte(Params().MessageStart()[0]);
nRewind = blkdat.GetPos()+1;
blkdat >> FLATDATA(buf);
- if (memcmp(buf, Params().MessageStart(), 4))
+ if (memcmp(buf, Params().MessageStart(), MESSAGE_START_SIZE))
continue;
// read size
blkdat >> nSize;