remove CTransaction::IsNewerThan which is never used
This commit is contained in:
parent
0e31e5631c
commit
f4057cb749
2 changed files with 0 additions and 30 deletions
29
src/core.cpp
29
src/core.cpp
|
@ -77,35 +77,6 @@ uint256 CTransaction::GetHash() const
|
||||||
return SerializeHash(*this);
|
return SerializeHash(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CTransaction::IsNewerThan(const CTransaction& old) const
|
|
||||||
{
|
|
||||||
if (vin.size() != old.vin.size())
|
|
||||||
return false;
|
|
||||||
for (unsigned int i = 0; i < vin.size(); i++)
|
|
||||||
if (vin[i].prevout != old.vin[i].prevout)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
bool fNewer = false;
|
|
||||||
unsigned int nLowest = std::numeric_limits<unsigned int>::max();
|
|
||||||
for (unsigned int i = 0; i < vin.size(); i++)
|
|
||||||
{
|
|
||||||
if (vin[i].nSequence != old.vin[i].nSequence)
|
|
||||||
{
|
|
||||||
if (vin[i].nSequence <= nLowest)
|
|
||||||
{
|
|
||||||
fNewer = false;
|
|
||||||
nLowest = vin[i].nSequence;
|
|
||||||
}
|
|
||||||
if (old.vin[i].nSequence < nLowest)
|
|
||||||
{
|
|
||||||
fNewer = true;
|
|
||||||
nLowest = old.vin[i].nSequence;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fNewer;
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t CTransaction::GetValueOut() const
|
int64_t CTransaction::GetValueOut() const
|
||||||
{
|
{
|
||||||
int64_t nValueOut = 0;
|
int64_t nValueOut = 0;
|
||||||
|
|
|
@ -219,7 +219,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
uint256 GetHash() const;
|
uint256 GetHash() const;
|
||||||
bool IsNewerThan(const CTransaction& old) const;
|
|
||||||
|
|
||||||
// Return sum of txouts.
|
// Return sum of txouts.
|
||||||
int64_t GetValueOut() const;
|
int64_t GetValueOut() const;
|
||||||
|
|
Loading…
Reference in a new issue