diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 4533b0196..7f49f785b 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -635,6 +635,7 @@ UniValue listbanned(const UniValue& params, bool fHelp, const CPubKey& mypk) std::map banMap; CNode::GetBanned(banMap); + const int64_t current_time{GetTime()}; UniValue bannedAddresses(UniValue::VARR); for (std::map::iterator it = banMap.begin(); it != banMap.end(); it++) @@ -642,6 +643,7 @@ UniValue listbanned(const UniValue& params, bool fHelp, const CPubKey& mypk) UniValue rec(UniValue::VOBJ); rec.push_back(Pair("address", (*it).first.ToString())); rec.push_back(Pair("banned_until", (*it).second)); + rec.push_back(Pair("time_remaining", (*it).second - current_time)); bannedAddresses.push_back(rec); }