This fixes two issues with p2p_leak_tx.py
:
1.) #33090: As far as I can see, this is just the randomness of NextInvToInbounds
/ rand_exp_duration
, which has a probability of e^-(60s/5s) = 6.14×10^−6
to result in a period > 60s (our waiting time), so that the test would fail every 160k runs… Doubling the timeout should be sufficient to lower the probability drastically.
2.) The subtest test_notfound_on_unannounced_tx
has some (w)txid confusion: we send a MSG_TX
-type getdata with a wtxid
in it, which necessarily always results in a NOTFOUND. I changed this to use wtxids everywhere - because of the timing, the branch where no notfound is received is still extremely unlikely to reach though. Not sure if this is essential for the test, but we could add a random delay of 2-3s to trigger both paths on a regular basis.