Page MenuHomePhabricator

Fix style nits in p2p_compactblocks, make it easier to debug
ClosedPublic

Authored by Fabien on Jul 16 2024, 13:29.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC29da2db59a44: Fix style nits in p2p_compactblocks, make it easier to debug
Summary

This diff fixes several nits found while doing D16474:

  • Use the block hash as hex string in assert_equal. This is a bit slower but the debug.log shows the hash as hex string so it's much easier to debug via combine_logs.py
  • Don't override the default timeout, this is uncessary and could introduce spurious failures
  • Consistently use make_conform_to_ctor
  • Fix a related but wrong comment in messages.py
Test Plan
./test/functional/test_runner.py p2p_compactblocks

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cleanup_p2p_compactblocks
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29581
Build 58697: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 58696: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Jul 16 2024, 13:29
PiRK added a subscriber: PiRK.
PiRK added inline comments.
test/functional/p2p_compactblocks.py
818

Nice bugfix! This assertion would only fail for very low integers

>>> a = 0xdeadbeef
>>> 0xdeadbeef is a
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
False
>>>
>>> a = 256
>>> 256 is a
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True
>>>
>>> a = 257
>>> 257 is a
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
False
This revision is now accepted and ready to land.Jul 16 2024, 14:40