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
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
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);