message: rpc: expose nLastBlockTime/TXTime as getpeerinfo last_block/transaction
diff: @@ -102,6 +102,8 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
  {RPCResult::Type::BOOL, "relaytxes", "Whether peer has asked us to relay transactions to it"},
  {RPCResult::Type::NUM_TIME, "lastsend", "The " + UNIX_EPOCH_TIME + " of the last send"},
  {RPCResult::Type::NUM_TIME, "lastrecv", "The " + UNIX_EPOCH_TIME + " of the last receive"},
  + {RPCResult::Type::NUM_TIME, "last_transaction", "The " + UNIX_EPOCH_TIME + " of the last valid transaction received from this peer"},
  + {RPCResult::Type::NUM_TIME, "last_block", "The " + UNIX_EPOCH_TIME + " of the last block received from this peer"},
  {RPCResult::Type::NUM, "bytessent", "The total bytes sent"},
  {RPCResult::Type::NUM, "bytesrecv", "The total bytes received"},
  {RPCResult::Type::NUM_TIME, "conntime", "The " + UNIX_EPOCH_TIME + " of the connection"},
  @@ -171,6 +173,8 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
  obj.pushKV("relaytxes", stats.fRelayTxes);
  obj.pushKV("lastsend", stats.nLastSend);
  obj.pushKV("lastrecv", stats.nLastRecv);
  + obj.pushKV("last_transaction", stats.nLastTXTime);
  + obj.pushKV("last_block", stats.nLastBlockTime);
  obj.pushKV("bytessent", stats.nSendBytes);
  obj.pushKV("bytesrecv", stats.nRecvBytes);
  obj.pushKV("conntime", stats.nTimeConnected);
  