Apologies for code churn, but I've updated almost all of the code in these files, so I thought I might as well tidy up the code:
- remove newlines
- change tabs for spaces, to align with convention in other py files
- add comments
- add 'Bitcoin Core Developers' copyright notice