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 @@ -4501,7 +4501,7 @@ static const uint64_t MEMPOOL_DUMP_VERSION = 1;
45014501bool LoadMempool (void )
45024502{
45034503 int64_t nExpiryTimeout = GetArg (" -mempoolexpiry" , DEFAULT_MEMPOOL_EXPIRY) * 60 * 60 ;
4504- FILE* filestr = fopen ((GetDataDir () / " mempool.dat" ).string ().c_str (), " r " );
4504+ FILE* filestr = fopen ((GetDataDir () / " mempool.dat" ).string ().c_str (), " rb " );
45054505 CAutoFile file (filestr, SER_DISK, CLIENT_VERSION);
45064506 if (file.IsNull ()) {
45074507 LogPrintf (" Failed to open mempool file from disk. Continuing anyway.\n " );
@@ -4582,7 +4582,7 @@ void DumpMempool(void)
45824582 int64_t mid = GetTimeMicros ();
45834583
45844584 try {
4585- FILE* filestr = fopen ((GetDataDir () / " mempool.dat.new" ).string ().c_str (), " w " );
4585+ FILE* filestr = fopen ((GetDataDir () / " mempool.dat.new" ).string ().c_str (), " wb " );
45864586 if (!filestr) {
45874587 return ;
45884588 }
You can’t perform that action at this time.
0 commit comments