Also, update switch statments to our style guide
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19386 | core#19386]] [4/5]
https://github.com/bitcoin/bitcoin/pull/19386/commits/aaaaad562790cd4dce1568ae193f5393aacacedf
Depends on D10008