refactor: remove duplicate code from BlockAssembler
Summary:
There is no change in behavior.
Backport of core#24364.
Depends on D12953.
Test Plan:
ninja check-all
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D12954