From 058fa2afa78679d1e998fca7739bdd7a9c69fd5d Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 18 Jul 2023 14:19:59 +0700 Subject: [PATCH] fix: diff files were storing with bad protocol versions --- .../Models/Managers/Chain Managers/DSMasternodeManager.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DashSync/shared/Models/Managers/Chain Managers/DSMasternodeManager.m b/DashSync/shared/Models/Managers/Chain Managers/DSMasternodeManager.m index 61fa94896..5fca43392 100644 --- a/DashSync/shared/Models/Managers/Chain Managers/DSMasternodeManager.m +++ b/DashSync/shared/Models/Managers/Chain Managers/DSMasternodeManager.m @@ -701,7 +701,7 @@ - (void)peer:(DSPeer *)peer relayedMasternodeDiffMessage:(NSData *)message { UInt256 blockHash = result.blockHash; DSLog(@"•••• -> processed mnlistdiff %u..%u %@ .. %@", [self heightForBlockHash:baseBlockHash], [self heightForBlockHash:blockHash], uint256_hex(baseBlockHash), uint256_hex(blockHash)); #if SAVE_MASTERNODE_DIFF_TO_FILE - NSString *fileName = [NSString stringWithFormat:@"MNL_%@_%@__%d.dat", @([self heightForBlockHash:baseBlockHash]), @([self heightForBlockHash:blockHash]), @(peer.version)]; + NSString *fileName = [NSString stringWithFormat:@"MNL_%@_%@__%d.dat", @([self heightForBlockHash:baseBlockHash]), @([self heightForBlockHash:blockHash]), peer.version]; DSLog(@"•-• File %@ saved", fileName); [message saveToFile:fileName inDirectory:NSCachesDirectory]; #endif @@ -749,7 +749,7 @@ - (void)peer:(DSPeer *)peer relayedQuorumRotationInfoMessage:(NSData *)message { DSLog(@"•••• -> processed qrinfo h-4c %u..%u %@ .. %@", [self heightForBlockHash:result.mnListDiffResultAtH4C.baseBlockHash], [self heightForBlockHash:result.mnListDiffResultAtH4C.blockHash], uint256_hex(result.mnListDiffResultAtH4C.baseBlockHash), uint256_hex(result.mnListDiffResultAtH4C.blockHash)); } #if SAVE_MASTERNODE_DIFF_TO_FILE - NSString *fileName = [NSString stringWithFormat:@"QRINFO_%@_%@__%d.dat", @([self heightForBlockHash:baseBlockHash]), @([self heightForBlockHash:blockHash]), @(peer.version)]; + NSString *fileName = [NSString stringWithFormat:@"QRINFO_%@_%@__%d.dat", @([self heightForBlockHash:baseBlockHash]), @([self heightForBlockHash:blockHash]), peer.version]; DSLog(@"•-• File %@ saved", fileName); [message saveToFile:fileName inDirectory:NSCachesDirectory]; #endif