forked from stellar/stellar-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLedgerCloseData.h
53 lines (45 loc) · 1.3 KB
/
LedgerCloseData.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
// Copyright 2014 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 "TxSetFrame.h"
#include "main/Config.h"
#include "overlay/StellarXDR.h"
#include <string>
namespace stellar
{
/**
* Helper class that describes a single ledger-to-close -- a set of transactions
* and auxiliary values -- as decided by the Herder (and ultimately: SCP). This
* does not include the effects of _performing_ any transactions, merely the
* values that the network has agreed _to apply_ to the current ledger,
* atomically, in order to produce the next ledger.
*/
class LedgerCloseData
{
public:
LedgerCloseData(uint32_t ledgerSeq, TxSetFramePtr txSet,
StellarValue const& v);
uint32_t
getLedgerSeq() const
{
return mLedgerSeq;
}
TxSetFramePtr
getTxSet() const
{
return mTxSet;
}
StellarValue const&
getValue() const
{
return mValue;
}
private:
uint32_t mLedgerSeq;
TxSetFramePtr mTxSet;
StellarValue mValue;
};
std::string stellarValueToString(Config const& c, StellarValue const& sv);
#define emptyUpgradeSteps (xdr::xvector<UpgradeType, 6>(0))
}