aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/echo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/echo.cpp')
-rw-r--r--src/interfaces/echo.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interfaces/echo.cpp b/src/interfaces/echo.cpp
new file mode 100644
index 0000000000..9bbb42217b
--- /dev/null
+++ b/src/interfaces/echo.cpp
@@ -0,0 +1,18 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/echo.h>
+
+#include <memory>
+
+namespace interfaces {
+namespace {
+class EchoImpl : public Echo
+{
+public:
+ std::string echo(const std::string& echo) override { return echo; }
+};
+} // namespace
+std::unique_ptr<Echo> MakeEcho() { return std::make_unique<EchoImpl>(); }
+} // namespace interfaces