Page MenuHomePhabricator

Merge #15631: qa: mininode: Clearer error message on invalid magic bytes
ClosedPublic

Authored by jasonbcox on Oct 21 2020, 18:48.

Details

Summary

fab0a68aa2 qa: mininode: Clearer error message on invalid magic bytes (MarcoFalke)

Pull request description:

Old message:
```
ValueError: got garbage b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f\xe8\x03\x00\x00\x00\x00\x00\x00'
```

New message:
```
ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdapong\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x97\xe6\x04\xd2\xff\x00\x00\x00\x00\x00\x00\x00'
```

Backport of Core PR15631

Test Plan

For sanity:

test_runner.py p2p_invalid_messages