Remove unused variable
Summary: This is a partial backport of Core PR15759 : https://github.com/bitcoin/bitcoin/pull/15759/commits/26a93bce29fd813e1402b013f402869c25b656d1
Test Plan:
ninja all check
Reviewers: #bitcoin_abc, nakihito
Reviewed By: nakihito
Differential Revision: https://reviews.bitcoinabc.org/D6399