Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proof.h
Show All 11 Lines | |||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <serialize.h> | #include <serialize.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <array> | #include <array> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <vector> | #include <vector> | ||||
class CBlockIndex; | |||||
class CCoinsView; | class CCoinsView; | ||||
/** | /** | ||||
* How many UTXOs can be used for a single proof. | * How many UTXOs can be used for a single proof. | ||||
*/ | */ | ||||
static constexpr int AVALANCHE_MAX_PROOF_STAKES = 1000; | static constexpr int AVALANCHE_MAX_PROOF_STAKES = 1000; | ||||
namespace avalanche { | namespace avalanche { | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | public: | ||||
const CPubKey &getMaster() const { return master; } | const CPubKey &getMaster() const { return master; } | ||||
const std::vector<SignedStake> &getStakes() const { return stakes; } | const std::vector<SignedStake> &getStakes() const { return stakes; } | ||||
const ProofId &getId() const { return proofid; } | const ProofId &getId() const { return proofid; } | ||||
const LimitedProofId &getLimitedId() const { return limitedProofId; } | const LimitedProofId &getLimitedId() const { return limitedProofId; } | ||||
uint32_t getScore() const; | uint32_t getScore() const; | ||||
bool verify(ProofValidationState &state) const; | bool verify(ProofValidationState &state) const; | ||||
bool verify(ProofValidationState &state, const CCoinsView &view) const; | bool verify(ProofValidationState &state, const CCoinsView &view, | ||||
const CBlockIndex *pindex) const; | |||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOF_H | #endif // BITCOIN_AVALANCHE_PROOF_H |