| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This commit is mostly code movement; I'd recommend reviewing it
with git's `--color-moved` option.
|
| |
|
|
|
| |
Apparently 1.68 now warns when you call into_iter() on something
that's already an iterator. Fair enough. Let's stop doing that.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Unlike C tor, we treat unrecognized commands as reason to kill off
the connection entirely. That's fine; if we need to add an
unrecognized command in the future, we can use VERSIONS to negotiate
it.
Also, if someday we want this code to support relay channels as
well, we can use some type trickery to have that work too.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
| |
Not sure why the tree didn't have this newline already. "Whatever".
|
| | |
|
| |\
| |
| |
| |
| | |
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
|
| | |
| |
| |
| |
| | |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Error logging (ErrorReport, .report()) POC
See merge request tpo/core/arti!936
|
| | |/
| |
| |
| |
| |
| |
| | |
In tests, debug fmt is usually appropriate.
Found while looking for a candidate for
https://gitlab.torproject.org/tpo/core/arti/-/issues/680
|
| |/ |
|
| |\
| |
| |
| |
| | |
tor-cell: Rename for_client and for_relay
See merge request tpo/core/arti!793
|
| | |
| |
| |
| |
| |
| |
| | |
This commit renames the for_client and for_relay functions to
from_client and from_relay respectively, in order to indicate their
origin, as the term "for" is more likely to indicate a destination,
which is not true in that situation.
|
| |/
|
|
| |
The singleton variation here is almost never what we want.
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| |
|
|
|
|
|
| |
Now each `ChanTarget` has at most one `ChannelMethod`, and only
`Direct` `ChannelMethods` can have multiple addresses.
Closes #600.
|
| | |
|
| |
|
|
| |
These are now builders.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Or rather, if we *didn't* negotiate 4, which is too old.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
|
| |
|
|
|
|
|
|
|
| |
We already actually send and negotiate the padding, since !657,
but we ought to negotiate a protocol version where that's not a
violation!
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Making ChannelPaddingInstructions::default() accurately reflect the
initial state of the reactor's padding timer simplifies the code
somewhat.
(When padding is wanted, parameters are computed and inserted
explicitly, so the only change is that if we start out dormant, we
defer setting the timer parameters until necessary.)
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
|
| | |
|
| |
|
|
| |
Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
|
| |
|
|
| |
This was for testing and is no longer needed.
|
| | |
|
| | |
|
| |
|
|
| |
Run rustfmt; no other changes.
|
| |
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167
This makes some lines too long; I will run rustfmt in a separate
commit for clarity.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Get rid of unneeded constructor.
We never need to use hardcoded reduced padding parameters during
negotiation cell construction. If we are using reduced padding
parameters, the layers which decide this have netparams to use.
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826092
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825979
|
| |
|
|
|
| |
These have the unit in the type. Putting that in the field name too
is otiose.
|
| | |
|
| |
|
|
|
| |
We are going to want this for through-the-layers padding control
testing.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is actually a general facility for inserting locally-generated
cells into the outgoing stream.
It doesn't seem to be possible to do this without adding an additional
condition check to the reactor, since we need to insert it into the
right place in the stream, giving it priority over data, and only
using it up if there was room in the output.
We don't engage this machinery yet, because nothing sets
special_outgoing.
|
| |
|
|
|
|
|
|
|
|
|
| |
Change ChannelsParams::initial_update to compare fields with their
default values, and, if they're the same as the default, not to
include them in the returned update.
And if that update is then empty, return None.
The overall effect is to avoid the call to chan.reparameterize if
we're using the builtin default parameters, which is usual.
|
| |
|
|
|
| |
We're going to need this because the frontend is going to need to
defer some channel padding parameters updates.
|
| |
|
|
|
|
|
| |
Unfortunately, because we don't have derive-adhoc here yet, rustfmt
didn't get to notice that this comma was needed.
We are going to add field(s), so add the comma now.
|