diff options
Diffstat (limited to 'src/core.cpp')
-rw-r--r-- | src/core.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core.cpp b/src/core.cpp index 6c5ee1c0f8..ca28624529 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -119,6 +119,22 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) { return *this; } +bool CTransaction::IsEquivalentTo(const CTransaction& tx) const +{ + if (nVersion != tx.nVersion || + nLockTime != tx.nLockTime || + vin.size() != tx.vin.size() || + vout != tx.vout) + return false; + for (unsigned int i = 0; i < vin.size(); i++) + { + if (vin[i].nSequence != tx.vin[i].nSequence || + vin[i].prevout != tx.vin[i].prevout) + return false; + } + return true; +} + int64_t CTransaction::GetValueOut() const { int64_t nValueOut = 0; |