tests: bitcoin core tests should act only the public API
tests: remove unused variable