Skip to content

Commit ac95317

Browse files
committed
fix windows build
1 parent 3a73b43 commit ac95317

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

silkworm/db/kv/api/state_cache_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ TEST_CASE_METHOD(StateCacheTest, "CoherentStateCache::CoherentStateCache", "[db]
237237
}
238238
}
239239

240+
// Exclude on MSVC due to error LNK2001: unresolved external symbol testing::Matcher<class std::basic_string_view...
241+
// See also https://github.com/google/googletest/issues/4357
242+
#ifndef _WIN32
240243
TEST_CASE_METHOD(StateCacheTest, "CoherentStateCache::get_view returns empty view", "[db][kv][api][state_cache]") {
241244
CoherentCacheConfig config{.wait_for_new_block = false};
242245
CoherentStateCache cache{config};
@@ -574,5 +577,6 @@ TEST_CASE_METHOD(StateCacheTest, "CoherentStateCache::on_new_block clear the cac
574577
CHECK(spawn_and_wait(cache.get_view(old_txn))->empty());
575578
}
576579
}
580+
#endif // _WIN32
577581

578582
} // namespace silkworm::db::kv::api

silkworm/node/remote/ethbackend/grpc/server/backend_server_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class BackEndClient {
9090
};
9191

9292
constexpr uint64_t kTestSentryPeerCount = 10;
93-
constexpr std::string_view kTestSentryNodeId{"24bfa2cdce7c6a41184fa0809ad8d76969b7280952e9aa46179d90cfbab90f7d2b004928f0364389a1aa8d5166281f2ff7568493c1f719e8f6148ef8cf8af42d"};
94-
constexpr std::string_view kTestSentryNodeClientId{"MockSentryClient"};
93+
const std::string kTestSentryNodeId{"24bfa2cdce7c6a41184fa0809ad8d76969b7280952e9aa46179d90cfbab90f7d2b004928f0364389a1aa8d5166281f2ff7568493c1f719e8f6148ef8cf8af42d"};
94+
const std::string kTestSentryNodeClientId{"MockSentryClient"};
9595

9696
class MockSentryClient
9797
: public std::enable_shared_from_this<MockSentryClient>,
@@ -116,11 +116,11 @@ class MockSentryClient
116116
Task<NodeInfos> node_infos() override {
117117
const std::string ip_str = "1.2.3.4";
118118
const uint16_t port = 50555;
119-
const std::string node_url_str = std::string("enode://") + std::string{kTestSentryNodeId} + "@" + ip_str + ":" + std::to_string(port);
119+
const std::string node_url_str = std::string("enode://") + kTestSentryNodeId + "@" + ip_str + ":" + std::to_string(port);
120120

121121
silkworm::sentry::api::NodeInfo info = {
122122
silkworm::sentry::EnodeUrl{node_url_str},
123-
std::string{kTestSentryNodeClientId},
123+
kTestSentryNodeClientId,
124124
boost::asio::ip::tcp::endpoint{boost::asio::ip::make_address(ip_str), port},
125125
port,
126126
};

0 commit comments

Comments
 (0)