- introduce constant variables `score_before` and
`score_after` in order to improve readability
- deduplicate calls to LogPrint(), eliminates else-branch
- update `BAN` to `DISCOURAGE` in logs (missed in D6506)
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/22495 | core#22495]]