Skip to content

Commit 762c00c

Browse files
committed
Avoid function hiding.
1 parent 0b24055 commit 762c00c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

include/bitcoin/server/protocols/protocol_electrum_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class BCS_API protocol_electrum_version
4848
}
4949

5050
virtual void shake(network::result_handler&& handler) NOEXCEPT;
51-
virtual void complete(const code& ec, const code& shake) NOEXCEPT;
51+
virtual void finished(const code& ec, const code& shake) NOEXCEPT;
5252

5353
protected:
5454
static constexpr electrum_version minimum = electrum_version::v1_4;

src/protocols/protocol_electrum_version.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
3838
BC_PUSH_WARNING(SMART_PTR_NOT_NEEDED)
3939
BC_PUSH_WARNING(NO_VALUE_OR_CONST_REF_SHARED_PTR)
4040

41-
// Start/complete (handshake).
41+
// Start/finished (handshake).
4242
// ----------------------------------------------------------------------------
4343

4444
// Session resumes the channel following return from start().
@@ -59,7 +59,7 @@ void protocol_electrum_version::shake(result_handler&& handler) NOEXCEPT
5959
protocol_rpc<channel_electrum>::start();
6060
}
6161

62-
void protocol_electrum_version::complete(const code& ec,
62+
void protocol_electrum_version::finished(const code& ec,
6363
const code& shake) NOEXCEPT
6464
{
6565
BC_ASSERT(stranded());
@@ -92,7 +92,7 @@ void protocol_electrum_version::handle_server_version(const code& ec,
9292
(!set_client(client_name) || !set_version(protocol_version)))
9393
{
9494
const auto reason = error::invalid_argument;
95-
send_code(reason, BIND(complete, _1, reason));
95+
send_code(reason, BIND(finished, _1, reason));
9696
}
9797
else
9898
{
@@ -103,7 +103,7 @@ void protocol_electrum_version::handle_server_version(const code& ec,
103103
{ string_t{ server_name() } },
104104
{ string_t{ negotiated_version() } }
105105
}
106-
}, 70, BIND(complete, _1, error::success));
106+
}, 70, BIND(finished, _1, error::success));
107107
}
108108

109109
// Handshake must leave channel paused, before leaving stranded handler.
@@ -225,6 +225,7 @@ std::string_view protocol_electrum_version::version_to_string(
225225
{
226226
static const std::unordered_map<electrum_version, std::string_view> map
227227
{
228+
{ electrum_version::v0_0, "0.0" },
228229
{ electrum_version::v0_6, "0.6" },
229230
{ electrum_version::v0_8, "0.8" },
230231
{ electrum_version::v0_9, "0.9" },
@@ -236,8 +237,7 @@ std::string_view protocol_electrum_version::version_to_string(
236237
{ electrum_version::v1_4, "1.4" },
237238
{ electrum_version::v1_4_1, "1.4.1" },
238239
{ electrum_version::v1_4_2, "1.4.2" },
239-
{ electrum_version::v1_6, "1.6" },
240-
{ electrum_version::v0_0, "0.0" }
240+
{ electrum_version::v1_6, "1.6" }
241241
};
242242

243243
const auto it = map.find(version);
@@ -250,6 +250,7 @@ electrum_version protocol_electrum_version::version_from_string(
250250
{
251251
static const std::unordered_map<std::string_view, electrum_version> map
252252
{
253+
{ "0.0", electrum_version::v0_0 },
253254
{ "0.6", electrum_version::v0_6 },
254255
{ "0.8", electrum_version::v0_8 },
255256
{ "0.9", electrum_version::v0_9 },
@@ -261,8 +262,7 @@ electrum_version protocol_electrum_version::version_from_string(
261262
{ "1.4", electrum_version::v1_4 },
262263
{ "1.4.1", electrum_version::v1_4_1 },
263264
{ "1.4.2", electrum_version::v1_4_2 },
264-
{ "1.6", electrum_version::v1_6 },
265-
{ "0.0", electrum_version::v0_0 }
265+
{ "1.6", electrum_version::v1_6 }
266266
};
267267

268268
const auto it = map.find(version);

0 commit comments

Comments
 (0)