mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
29 lines
747 B
C++
29 lines
747 B
C++
/*
|
|
*
|
|
* Modified by ScyllaDB
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.1 and Apache-2.0)
|
|
*/
|
|
#include "gms/versioned_value.hh"
|
|
#include "message/messaging_service.hh"
|
|
|
|
namespace gms {
|
|
|
|
static_assert(std::is_nothrow_default_constructible_v<versioned_value>);
|
|
static_assert(std::is_nothrow_move_constructible_v<versioned_value>);
|
|
|
|
versioned_value versioned_value::network_version() {
|
|
return versioned_value(format("{}", netw::messaging_service::current_version));
|
|
}
|
|
|
|
sstring versioned_value::make_token_string(const std::unordered_set<dht::token>& tokens) {
|
|
if (tokens.empty()) {
|
|
return "";
|
|
}
|
|
return tokens.begin()->to_sstring();
|
|
}
|
|
|
|
} // namespace gms
|