Make addDataPadding method to avoid clutter. #668
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-20#668
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
addDataPadding adds bytes with 0 value to pad message to desired length.
msg\x00\x00\x00\x00\x00\x00\x00\x00\x00
becomesaddDataPadding('msg')
Good job. But it would be better to cache slices, strip the null bytes, use a compiled struct to unpack/pack the headers, and use a dispatcher.
Thank you antius!