Fixes an intermittent failure for p2p_v2_misbehaving.py
reported in #30420 (review).
A different error message "socket no message in first %i seconds"
will be displayed if m_last_send=0
or if m_last_recv is 0
. Fix this by:
- mocktime bump is done after all the bytes are received. (
m_last_recv is not 0 now
) - wait until bytes are sent by
TestNode
/bitcoind
(m_last_send is not 0 now
)
See https://cirrus-ci.com/task/5359619151757312?logs=ci#L3935 for an example failure (I wasn’t able to reproduce the intermittent failure locally but I think the fix is logical)