Skip to content

Commit

Permalink
IS 968 fix snapshot dowloading for small snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Oct 23, 2024
1 parent a5492a9 commit cefd6af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions libskale/SnapshotManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ void SnapshotManager::restoreSnapshot( unsigned _blockNumber ) {
if ( _blockNumber > 0 )
volumes = allVolumes;
#endif
// if ( chainParams.nodeInfo.archiveMode && _blockNumber == 0 )
// volumes = coreVolumes;
// else
// volumes = allVolumes;

int dummy_counter = 0;
for ( const string& vol : volumes ) {
Expand Down Expand Up @@ -769,10 +765,6 @@ void SnapshotManager::computeSnapshotHash( unsigned _blockNumber, bool is_checki
if ( _blockNumber > 0 )
volumes = allVolumes;
#endif
// if ( chainParams.nodeInfo.archiveMode && _blockNumber == 0 )
// volumes = coreVolumes;
// else
// volumes = allVolumes;

for ( const auto& volume : volumes ) {
int res = btrfs.subvolume.property_set(
Expand Down
4 changes: 2 additions & 2 deletions skaled/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1652,9 +1652,9 @@ int main( int argc, char** argv ) try {
// sleep before send skale_getSnapshot again - will receive error
clog( VerbosityInfo, "main" )
<< std::string( "Will sleep for " )
<< chainParams.sChain.snapshotDownloadInactiveTimeout
<< chainParams.sChain.snapshotDownloadInactiveTimeout + 10
<< std::string( " seconds before downloading 0 snapshot" );
sleep( chainParams.sChain.snapshotDownloadInactiveTimeout );
sleep( chainParams.sChain.snapshotDownloadInactiveTimeout + 10 );

downloadAndProccessSnapshot(
snapshotManager, chainParams, urlToDownloadSnapshotFrom, false );
Expand Down

0 comments on commit cefd6af

Please sign in to comment.