HomePhabricator

test_framework: improve the syntax of serialize() methods

Description

test_framework: improve the syntax of serialize() methods

Summary:
These changes do not affect behavior.

Don't unnecessarily initialize an empty bytes object before appending to it.
Don't use an intermediate variable before returning in trivial cases.
Add a few typehints when they are not obvious to the reader (e.g. when *string* actually means *bytes* because of python2 legacy)

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17835

Details

Provenance
PiRKAuthored on Thu, Mar 20, 08:23
PiRKPushed on Thu, Mar 20, 11:32
Reviewer
Restricted Project
Differential Revision
D17835: test_framework: improve the syntax of serialize() methods
Parents
rABCd0d90118ccea: [avalanche] Add to the recently finalized items filter at callsite
Branches
Unknown
Tags
Unknown