This commit is contained in:
Scott Sadler
2018-04-16 22:57:35 -05:00
parent 3205a566d4
commit 0cb91a8d20
30 changed files with 1002 additions and 289 deletions

View File

@@ -452,11 +452,21 @@ public:
// Compute modified tx size for priority calculation (optionally given tx size)
unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
bool IsMint() const
{
return (vin.size() == 1 && vin[0].prevout.hash.IsNull());
}
bool IsCoinBase() const
{
return (vin.size() == 1 && vin[0].prevout.IsNull());
}
bool IsCoinImport() const
{
return IsMint() && vin[0].prevout.n == 10e8;
}
friend bool operator==(const CTransaction& a, const CTransaction& b)
{
return a.hash == b.hash;