Commit da4ee19a authored by Ashot's avatar Ashot

Fixed input age calculation

parent 7de86517
......@@ -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