Commit e45c6fae authored by Ashot's avatar Ashot

Merge branch 'fix-input-age-calculation' into 'Current-dev'

Fixed input age calculation

See merge request crown/crown-core!132
parents 7de86517 da4ee19a
......@@ -891,8 +891,10 @@ int GetInputHeight(const CTxIn& vin)
int GetInputAge(const CTxIn& vin)
{
int height = GetInputHeight(vin);
if (height < 0)
if (height < 0 || height == MEMPOOL_HEIGHT)
return 0;
return (chainActive.Tip()->nHeight + 1) - height;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment