Skip to content

Commit 9b70385

Browse files
committed
Simplify confirm chaser (WIP).
1 parent 243ec11 commit 9b70385

File tree

2 files changed

+166
-297
lines changed

2 files changed

+166
-297
lines changed

include/bitcoin/node/chasers/chaser_confirm.hpp

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,11 @@ class BCN_API chaser_confirm
5151
event_value value) NOEXCEPT;
5252

5353
virtual void do_validated(height_t height) NOEXCEPT;
54-
virtual void do_reorganize(size_t height) NOEXCEPT;
55-
virtual void do_organize(size_t height) NOEXCEPT;
56-
57-
virtual void enqueue_block(const database::header_link& link) NOEXCEPT;
58-
virtual void confirm_tx(const database::context& ctx,
59-
const database::tx_link& link, const race::ptr& racer) NOEXCEPT;
60-
virtual void handle_tx(const code& ec, const database::tx_link& tx,
61-
const race::ptr& racer) NOEXCEPT;
62-
virtual void handle_txs(const code& ec, const database::tx_link& tx,
63-
const database::header_link& link, size_t height)NOEXCEPT;
64-
virtual void confirm_block(const code& ec,
65-
const database::header_link& link, size_t height) NOEXCEPT;
66-
virtual void next_block(size_t height) NOEXCEPT;
54+
virtual void do_reorganize(header_links& fork, size_t fork_point) NOEXCEPT;
55+
virtual void do_organize(header_links& fork, const header_links& popped,
56+
size_t fork_point) NOEXCEPT;
6757

6858
private:
69-
void reset() NOEXCEPT;
70-
bool busy() const NOEXCEPT;
71-
7259
bool set_organized(const database::header_link& link,
7360
height_t height) NOEXCEPT;
7461
bool reset_organized(const database::header_link& link,
@@ -77,8 +64,6 @@ class BCN_API chaser_confirm
7764
height_t height) NOEXCEPT;
7865
bool roll_back(const header_links& popped, size_t fork_point,
7966
size_t top) NOEXCEPT;
80-
bool roll_back(const header_links& popped, size_t fork_point,
81-
size_t top, const database::header_link& link) NOEXCEPT;
8267

8368
bool get_fork_work(uint256_t& fork_work, header_links& fork,
8469
height_t fork_top) const NOEXCEPT;
@@ -90,9 +75,8 @@ class BCN_API chaser_confirm
9075

9176
// These are protected by strand.
9277
network::threadpool threadpool_;
93-
header_links popped_{};
94-
header_links fork_{};
95-
size_t fork_point_{};
78+
network::asio::strand strand_;
79+
bool mature_{};
9680
};
9781

9882
} // namespace node

0 commit comments

Comments
 (0)