49eb0916d [tests] Avoid redundant assignments. Remove unused variables. (practicalswift)
Pull request description:
- Remove unused variables.
- Avoid redundant assignments.
Tree-SHA512: 74dd59680c785c601982a791648bc5d9b04e2b4509119e05f2e402b94998f5bbcbdea1f82d05e5f431fe06642e8db7c346fa8bc4c11f8cdcc554bc70d735534c
Backport of Core PR10777
https://github.com/bitcoin/bitcoin/pull/10777/