p2p: Make timeout mockable and type safe, speed up test

This commit is contained in:
MarcoFalke
2020-07-10 18:19:11 +02:00
parent fa6d5a238d
commit fadc0c80ae
12 changed files with 62 additions and 54 deletions

View File

@@ -211,8 +211,8 @@ static RPCHelpMan getpeerinfo()
obj.pushKV("services", strprintf("%016x", stats.nServices));
obj.pushKV("servicesnames", GetServicesNames(stats.nServices));
obj.pushKV("relaytxes", stats.fRelayTxes);
obj.pushKV("lastsend", stats.m_last_send);
obj.pushKV("lastrecv", stats.m_last_recv);
obj.pushKV("lastsend", count_seconds(stats.m_last_send));
obj.pushKV("lastrecv", count_seconds(stats.m_last_recv));
obj.pushKV("last_transaction", stats.nLastTXTime);
obj.pushKV("last_block", stats.nLastBlockTime);
obj.pushKV("bytessent", stats.nSendBytes);