Page MenuHomePhabricator

[backport#19272] net, test: invalid p2p messages and test framework improvements
ClosedPublic

Authored by majcosta on May 14 2021, 23:46.

Details

Summary

56010f92564a94b0ca6c008c0e6f74a19fad4a2a test: hoist p2p values to test framework constants (Jon Atack)
75447f0893f9ad9bf83d182b301d139430d8de1c test: improve msg sends and p2p disconnections in p2p_invalid_messages (Jon Atack)
57960192a5362ff1a7b996995332535f4c2a25c3 test: refactor test_large_inv() into 3 tests with common method (Jon Atack)
e2b21d8a597c536a8617408d43958bfe9f98a442 test: add p2p_invalid_messages logging (Jon Atack)
9fa494dc0969c61d5ef33708a08923cca19ce091 net: update misbehavior logging for oversized messages (Jon Atack)

Pull request description:

...seen while reviewing #19264, #19252, #19304 and #19107:

in net_processing.cpp

  • make the debug logging for oversized message size misbehavior the same for addr, getdata, headers and inv messages

in p2p_invalid_messages

  • add missing logging
  • improve assertions/message sends, move cleanup disconnections outside the assertion scopes
  • split a slowish 3-part test into 3 order-independent tests
  • add a few p2p constants to the test framework

Backport of core#19272

Test Plan
ninja all check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable