@@ -242,39 +242,35 @@ class BCS_API protocol_electrum
242242 void do_header (node::header_t link) NOEXCEPT;
243243 void do_outpoint (node::header_t link) NOEXCEPT;
244244 void do_scripthash (node::header_t link) NOEXCEPT;
245- void do_regressed (node::header_t link) NOEXCEPT;
245+ void do_reorganized (node::header_t link) NOEXCEPT;
246246
247247 // / Address.
248248 // / -----------------------------------------------------------------------
249249
250- // subscription.
251250 void scripthash_subscribe (const hash_digest& hash,
252251 notify_t type) NOEXCEPT;
253252 void do_scripthash_subscribe (const hash_digest& hash,
254253 notify_t type) NOEXCEPT;
255254 void complete_scripthash_subscribe (const code& ec,
256255 hash_digest& status, const hash_digest& hash) NOEXCEPT;
257-
258- // unsubscription.
259256 void scripthash_unsubscribe (const hash_digest& hash) NOEXCEPT;
260257 void do_scripthash_unsubscribe (const hash_digest& hash) NOEXCEPT;
261258 void complete_scripthash_unsubscribe (bool found) NOEXCEPT;
262-
263- // notification (do_scripthash()).
264259 void scripthash_notify (const hash_digest& status, const hash_digest& hash,
265260 notify_t type) NOEXCEPT;
266261
267262 // / Outpoint.
268263 // / -----------------------------------------------------------------------
269264
270- // subscription (do_outpoint()).
271- bool get_outpoint_status (interface::object_t & status,
272- const system::chain::point& prevout) const NOEXCEPT;
273- bool send_outpoint_status (const system::chain::point& prevout,
274- const std::string& spk_hint) NOEXCEPT;
275-
276- // unsubscription.
277- // notification.
265+ void do_outpoint_subscribe (const system::chain::point& prevout,
266+ const std::string& hint) NOEXCEPT;
267+ void complete_outpoint_subscribe (const code& ec,
268+ const system::chain::point& prevout,
269+ const std::string& hint) NOEXCEPT;
270+ void do_outpoint_unsubscribe (const system::chain::point& prevout) NOEXCEPT;
271+ void complete_outpoint_unsubscribe (bool found) NOEXCEPT;
272+ void outpoint_notify (const std::unique_ptr<interface::object_t >& status,
273+ const system::chain::point& prevout) NOEXCEPT;
278274
279275 // / Utilities.
280276 // / -----------------------------------------------------------------------
@@ -323,15 +319,21 @@ class BCS_API protocol_electrum
323319 static constexpr electrum::version minimum = version_t ::minimum;
324320 static constexpr electrum::version maximum = version_t ::maximum;
325321
326- // Scripthash status .
322+ // Status utilities .
327323 code get_scripthash_status (hash_digest& out, subscription& sub,
328324 const hash_digest& hash) NOEXCEPT;
325+ bool get_outpoint_statuses (std::vector<interface::object_t >& out,
326+ const system::chain::point& prevout) const NOEXCEPT;
327+ bool get_outpoint_status (interface::object_t & out,
328+ const system::chain::point& prevout) const NOEXCEPT;
329+ bool send_outpoint_status (const system::chain::point& prevout,
330+ const std::string& hint) NOEXCEPT;
329331
330332 // Transformations.
331- static std::string to_method_name (notify_t type) NOEXCEPT;
332333 static array_t transform (const unspents& unspents) NOEXCEPT;
333334 static array_t transform (const histories& histories) NOEXCEPT;
334335 static hash_digest to_status (const histories& histories) NOEXCEPT;
336+ static std::string to_method_name (notify_t type) NOEXCEPT;
335337
336338 // Compute server.features.hosts value from config.
337339 object_t self_hosts () const NOEXCEPT;
@@ -365,8 +367,8 @@ class BCS_API protocol_electrum
365367 network::asio::strand notification_strand_;
366368
367369 // These are protected by notification strand.
368- std::map<hash_digest, subscription> address_subscriptions_{};
369370 std::set<system::chain::point> outpoint_subscriptions_{};
371+ std::map<hash_digest, subscription> address_subscriptions_{};
370372};
371373
372374} // namespace server
0 commit comments