X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=ea73a0f6b263034c15b048cf04df2053e7fe503d;hb=94ced84524166a535de3f2de2c2103b7d7612f1c;hp=cad00692f0d7e2200cbc5a019c6de46db746176f;hpb=832a0e09c6428dc8a7090f18c80bc737dbf324de;p=novacoin.git diff --git a/src/main.h b/src/main.h index cad0069..ea73a0f 100644 --- a/src/main.h +++ b/src/main.h @@ -667,6 +667,7 @@ protected: public: bool RemoveFromMemoryPool(); bool GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const; // ppcoin: get transaction coin age + bool CheckProofOfStake(CTxDB& txdb, unsigned int nBits) const; }; @@ -877,6 +878,17 @@ public: return (int64)nTime; } + // ppcoin: two types of block: proof-of-work or proof-of-stake + bool IsProofOfStake() const + { + return (vtx.size() > 1 && vtx[1].IsCoinStake()); + } + + bool IsProofOfWork() const + { + return !IsProofOfStake(); + } + // ppcoin: get max transaction timestamp int64 GetMaxTransactionTime() const {