Merge #12918: test: Assert on correct variable
Summary:
bf08fc5b6b test: Assert on correct variable (Karl-Johan Alm)
Pull request description:
Tree-SHA512: bdc4a0f94d49ab29234ee429585c6c73e46ff096c46d6053eb15c0a84cdea5490425cd842d051d41e158450945b229239b08002c193fdcc212eb2ca0e63aa653
Backport of Core PR12918
https://github.com/bitcoin/bitcoin/pull/12918/files
Test Plan: make check
Reviewers: #bitcoin_abc, deadalnix, nakihito
Reviewed By: nakihito
Differential Revision: https://reviews.bitcoinabc.org/D3820