Skip to content

Commit 4f5c4d2

Browse files
committed
Rename events un/subscribe to chase (noe conflict).
1 parent 65fba1e commit 4f5c4d2

21 files changed

Lines changed: 50 additions & 50 deletions

include/bitcoin/node/chasers/chaser.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class BCN_API chaser
9898
/// -----------------------------------------------------------------------
9999

100100
/// Call from chaser start methods (requires node strand).
101-
virtual object_key subscribe_events(event_notifier&& handler) NOEXCEPT;
101+
virtual object_key subscribe_chase(event_notifier&& handler) NOEXCEPT;
102102

103103
/// Set event (does not require node strand).
104104
virtual void notify(const code& ec, chase event_,
@@ -164,8 +164,8 @@ class BCN_API chaser
164164
size_t position_{};
165165
};
166166

167-
#define SUBSCRIBE_EVENTS(method, ...) \
168-
subscribe_events(BIND(method, __VA_ARGS__))
167+
#define SUBSCRIBE_CHASE(method, ...) \
168+
subscribe_chase(BIND(method, __VA_ARGS__))
169169

170170
} // namespace node
171171
} // namespace libbitcoin

include/bitcoin/node/full_node.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ class BCN_API full_node
9393
event_value value) NOEXCEPT;
9494

9595
/// Call from chaser start() methods (requires strand).
96-
virtual object_key subscribe_events(event_notifier&& handler) NOEXCEPT;
96+
virtual object_key subscribe_chase(event_notifier&& handler) NOEXCEPT;
9797

9898
/// Call from protocol start() methods.
99-
virtual void subscribe_events(event_notifier&& handler,
99+
virtual void subscribe_chase(event_notifier&& handler,
100100
event_completer&& complete) NOEXCEPT;
101101

102102
/// Unsubscribe from chaser events.
103-
virtual void unsubscribe_events(object_key key) NOEXCEPT;
103+
virtual void unsubscribe_chase(object_key key) NOEXCEPT;
104104

105105
/// Suspensions.
106106
/// -----------------------------------------------------------------------
@@ -174,7 +174,7 @@ class BCN_API full_node
174174
void do_close() NOEXCEPT override;
175175

176176
private:
177-
void do_subscribe_events(const event_notifier& handler,
177+
void do_subscribe_chase(const event_notifier& handler,
178178
const event_completer& complete) NOEXCEPT;
179179
void do_notify(const code& ec, chase event_, event_value value) NOEXCEPT;
180180
void do_notify_one(object_key key, const code& ec, chase event_,

include/bitcoin/node/impl/chasers/chaser_organize.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ code CLASS::start() NOEXCEPT
6161
LOGN("Candidate top [" << system::encode_hash(state_->hash()) << ":"
6262
<< state_->height() << "].");
6363

64-
SUBSCRIBE_EVENTS(handle_chase, _1, _2, _3);
64+
SUBSCRIBE_CHASE(handle_chase, _1, _2, _3);
6565
return error::success;
6666
}
6767

include/bitcoin/node/protocols/protocol.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ class BCN_API protocol
7171
/// -----------------------------------------------------------------------
7272

7373
/// Subscribe to chaser events (max one active per protocol).
74-
virtual void subscribe_events(event_notifier&& handler) NOEXCEPT;
74+
virtual void subscribe_chase(event_notifier&& handler) NOEXCEPT;
7575

7676
/// Override to handle subscription completion (stranded).
7777
virtual void subscribed(const code& ec, object_key key) NOEXCEPT;
7878

7979
/// Unsubscribe from chaser events.
8080
/// Subscribing protocol must invoke from overridden stopping().
81-
virtual void unsubscribe_events() NOEXCEPT;
81+
virtual void unsubscribe_chase() NOEXCEPT;
8282

8383
/// Get the subscription key (for notify_one).
8484
virtual object_key events_key() const NOEXCEPT;

include/bitcoin/node/sessions/session.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class BCN_API session
6363
event_value value) const NOEXCEPT;
6464

6565
/// Subscribe to chaser events (requires node strand).
66-
virtual object_key subscribe_events(event_notifier&& handler) NOEXCEPT;
66+
virtual object_key subscribe_chase(event_notifier&& handler) NOEXCEPT;
6767

6868
/// Subscribe to chaser events.
69-
virtual void subscribe_events(event_notifier&& handler,
69+
virtual void subscribe_chase(event_notifier&& handler,
7070
event_completer&& complete) NOEXCEPT;
7171

7272
/// Unsubscribe from chaser events.
73-
virtual void unsubscribe_events(object_key key) NOEXCEPT;
73+
virtual void unsubscribe_chase(object_key key) NOEXCEPT;
7474

7575
/// Methods.
7676
/// -----------------------------------------------------------------------
@@ -115,7 +115,7 @@ class BCN_API session
115115
session(full_node& node) NOEXCEPT;
116116

117117
private:
118-
void do_subscribe_events(const event_notifier& handler,
118+
void do_subscribe_chase(const event_notifier& handler,
119119
const event_completer& complete) NOEXCEPT;
120120

121121
private:

src/chasers/chaser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ code chaser::reload(const store::event_handler& handler) NOEXCEPT
8989
// Events.
9090
// ----------------------------------------------------------------------------
9191

92-
object_key chaser::subscribe_events(event_notifier&& handler) NOEXCEPT
92+
object_key chaser::subscribe_chase(event_notifier&& handler) NOEXCEPT
9393
{
94-
return node_.subscribe_events(std::move(handler));
94+
return node_.subscribe_chase(std::move(handler));
9595
}
9696

9797
void chaser::notify(const code& ec, chase event_,

src/chasers/chaser_check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ code chaser_check::start() NOEXCEPT
9696
const auto added = set_unassociated();
9797
LOGN("Fork point (" << requested_ << ") unassociated (" << added << ").");
9898

99-
SUBSCRIBE_EVENTS(handle_chase, _1, _2, _3);
99+
SUBSCRIBE_CHASE(handle_chase, _1, _2, _3);
100100
return error::success;
101101
}
102102

src/chasers/chaser_confirm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ code chaser_confirm::start() NOEXCEPT
5252

5353
if (!defer_)
5454
{
55-
SUBSCRIBE_EVENTS(handle_chase, _1, _2, _3);
55+
SUBSCRIBE_CHASE(handle_chase, _1, _2, _3);
5656
}
5757

5858
return error::success;

src/chasers/chaser_snapshot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ code chaser_snapshot::start() NOEXCEPT
6565
////if (enabled_confirm_)
6666
//// confirm_ = std::max(archive().get_top_confirmed(), checkpoint());
6767

68-
SUBSCRIBE_EVENTS(handle_chase, _1, _2, _3);
68+
SUBSCRIBE_CHASE(handle_chase, _1, _2, _3);
6969
return error::success;
7070
}
7171

src/chasers/chaser_storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ code chaser_storage::start() NOEXCEPT
5050
// Construct is too early to create the unstarted timer.
5151
disk_timer_ = std::make_shared<deadline>(log, strand(), seconds{1});
5252

53-
SUBSCRIBE_EVENTS(handle_chase, _1, _2, _3);
53+
SUBSCRIBE_CHASE(handle_chase, _1, _2, _3);
5454
return error::success;
5555
}
5656

0 commit comments

Comments
 (0)