tor-hsservice: ipt mgr: Break out merge_join_subset_by
I'm not sure about this.
The iteration contraption is almost all of the contents of import_new_expiry_times
, but now it is more abstract.
A benefit is that the iteration concept is separated from the action on join (updating the ours
expiry time), and now the iteration and merge strategy is more explicitly spelled out and could be unit tested.
Also, this code now has a check for sufficient-uniqueness of the keys (the IptLocalId
), detecting if entries get duplicated somehow. OTOH actually doing that check involves the new Input
struct with its many generics.
I haven't done unit tests for this yet but if you like this approach I will do so.