mininode: add an optimistic write and disable nagle
Summary:
Because the poll/select loop may pause for 100msec before actually doing
a send, and we have no way to force the loop awake, try sending from the
calling thread if the queue is empty.
Also, disable nagle as all sends should be either full messages or
unfinished sends.
This shaves an average of ~1 minute or so off of my accumulated runtime,
and 10-15 seconds off of actual runtime.
Backport of Core PR11323
Co-authored-by: Jason B. Cox <contact@jasonbcox.com>
Test Plan: test_runner.py --extended
Reviewers: deadalnix, schancel, #bitcoin_abc
Reviewed By: deadalnix, schancel, #bitcoin_abc
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1962