File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4180,7 +4180,7 @@ static const uint64_t MEMPOOL_DUMP_VERSION = 1;
4180
4180
bool LoadMempool (void )
4181
4181
{
4182
4182
int64_t nExpiryTimeout = GetArg (" -mempoolexpiry" , DEFAULT_MEMPOOL_EXPIRY) * 60 * 60 ;
4183
- FILE* filestr = fopen ((GetDataDir () / " mempool.dat" ).string ().c_str (), " r " );
4183
+ FILE* filestr = fopen ((GetDataDir () / " mempool.dat" ).string ().c_str (), " rb " );
4184
4184
CAutoFile file (filestr, SER_DISK, CLIENT_VERSION);
4185
4185
if (file.IsNull ()) {
4186
4186
LogPrintf (" Failed to open mempool file from disk. Continuing anyway.\n " );
@@ -4261,7 +4261,7 @@ void DumpMempool(void)
4261
4261
int64_t mid = GetTimeMicros ();
4262
4262
4263
4263
try {
4264
- FILE* filestr = fopen ((GetDataDir () / " mempool.dat.new" ).string ().c_str (), " w " );
4264
+ FILE* filestr = fopen ((GetDataDir () / " mempool.dat.new" ).string ().c_str (), " wb " );
4265
4265
if (!filestr) {
4266
4266
return ;
4267
4267
}
You can’t perform that action at this time.
0 commit comments