Skip to content

Refine the batch rule for restoring unreachable addresses. - #966

Open
echennells wants to merge 1 commit into
libbitcoin:masterfrom
echennells:fix/reclaim-batch-rule
Open

echennells wants to merge 1 commit into
libbitcoin:masterfrom
echennells:fix/reclaim-batch-rule

Conversation

@echennells

Copy link
Copy Markdown
Contributor

Applies your answers to the #942 questions (posted on #924).

A timeout attributes nothing. A timed-out address is already restored through its socket, so it no longer counts against restoring its unreachable batch members. With the gateway gone, connects wait about 3s for ARP before EHOSTUNREACH while the connect timer is 2.5-5s, so most such batches saw a timeout first and dropped.

A single failure is not evidence of a local outage. Unreachable members are now restored only if at least two members drew an address and none was attributable. Members that drew no address are not counted. With connect_batch_size = 1 an unreachable address is dropped again, as before #942, and #924 reseeds if the pool drains.

Tests: the single-code unreachable tests use a batch of two; new tests cover a batch of one and a batch in which only one member drew an address; the timeout test now expects both members restored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant