Permalink
Browse files

Re-add 'expires_in' in name_list and name_history while leaving name_…

…scan with only 'expired'
  • Loading branch information...
1 parent cd07675 commit 046ef4e81b0fd12804bfe6a5f757270c5b914e5d @khalahan committed Nov 29, 2011
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/namecoin.cpp
View
@@ -545,14 +545,11 @@ Value name_list(const Array& params, bool fHelp)
string strAddress = "";
GetNameAddress(txPos, strAddress);
oName.push_back(Pair("address", strAddress));
+ oName.push_back(Pair("expires_in", nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight));
if(nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight <= 0)
{
oName.push_back(Pair("expired", 1));
}
- else
- {
- oName.push_back(Pair("expires_in", nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight));
- }
oRes.push_back(oName);
}
}
@@ -668,14 +665,11 @@ Value name_history(const Array& params, bool fHelp)
string strAddress = "";
GetNameAddress(txPos, strAddress);
oName.push_back(Pair("address", strAddress));
+ oName.push_back(Pair("expires_in", nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight));
if(nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight <= 0)
{
oName.push_back(Pair("expired", 1));
}
- else
- {
- oName.push_back(Pair("expires_in", nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight));
- }
oRes.push_back(oName);
}
}

0 comments on commit 046ef4e

Please sign in to comment.