Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proof.h
Show All 9 Lines | |||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <serialize.h> | #include <serialize.h> | ||||
#include <uint256.h> | #include <uint256.h> | ||||
#include <array> | #include <array> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <vector> | #include <vector> | ||||
class CCoinsView; | |||||
namespace avalanche { | namespace avalanche { | ||||
class ProofValidationState; | class ProofValidationState; | ||||
struct ProofId : public uint256 { | struct ProofId : public uint256 { | ||||
explicit ProofId() : uint256() {} | explicit ProofId() : uint256() {} | ||||
explicit ProofId(const uint256 &b) : uint256(b) {} | explicit ProofId(const uint256 &b) : uint256(b) {} | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | public: | ||||
int64_t getExpirationTime() const { return expirationTime; } | int64_t getExpirationTime() const { return expirationTime; } | ||||
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; } | ||||
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; | |||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOF_H | #endif // BITCOIN_AVALANCHE_PROOF_H |