Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proof.h
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | public: | ||||
Amount getStakedAmount() const; | Amount getStakedAmount() 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; | ||||
}; | }; | ||||
using ProofRef = RCUPtr<const Proof>; | using ProofRef = RCUPtr<const Proof>; | ||||
class SaltedProofHasher : private SaltedUint256Hasher { | |||||
public: | |||||
SaltedProofHasher() : SaltedUint256Hasher() {} | |||||
size_t operator()(const ProofRef &proof) const { | |||||
return hash(proof->getId()); | |||||
} | |||||
}; | |||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOF_H | #endif // BITCOIN_AVALANCHE_PROOF_H |