forked from stellar/stellar-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStateSnapshot.h
34 lines (27 loc) · 955 Bytes
/
StateSnapshot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
// Copyright 2015 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
#include "history/HistoryArchive.h"
#include "util/Timer.h"
#include "util/TmpDir.h"
#include <map>
#include <memory>
#include <vector>
namespace stellar
{
class FileTransferInfo;
struct StateSnapshot : public std::enable_shared_from_this<StateSnapshot>
{
Application& mApp;
HistoryArchiveState mLocalState;
TmpDir mSnapDir;
std::shared_ptr<FileTransferInfo> mLedgerSnapFile;
std::shared_ptr<FileTransferInfo> mTransactionSnapFile;
std::shared_ptr<FileTransferInfo> mTransactionResultSnapFile;
std::shared_ptr<FileTransferInfo> mSCPHistorySnapFile;
StateSnapshot(Application& app, HistoryArchiveState const& state);
void makeLive();
bool writeHistoryBlocks() const;
};
}