P2p: minor style issues
This commit is contained in:
parent
9250e3891d
commit
568057ed8f
@ -99,7 +99,7 @@ end
|
|||||||
bytes, whereas the option is set in kbytes. Also, since the default
|
bytes, whereas the option is set in kbytes. Also, since the default
|
||||||
size is 64kB-1, it is actually impossible to set the default
|
size is 64kB-1, it is actually impossible to set the default
|
||||||
size using the option (the max is 63 kB). *)
|
size using the option (the max is 63 kB). *)
|
||||||
let check_binary_chunks_size size =
|
let check_binary_chunks_size size =
|
||||||
let value = size - Crypto.extrabytes in
|
let value = size - Crypto.extrabytes in
|
||||||
fail_unless
|
fail_unless
|
||||||
(value > 0 &&
|
(value > 0 &&
|
||||||
@ -347,7 +347,7 @@ module Reader = struct
|
|||||||
match status with
|
match status with
|
||||||
| Success { result ; size ; stream } ->
|
| Success { result ; size ; stream } ->
|
||||||
return_some (result, size, stream)
|
return_some (result, size, stream)
|
||||||
| Error _ ->
|
| Error _err ->
|
||||||
lwt_debug "[read_message] incremental decoding error" >>= fun () ->
|
lwt_debug "[read_message] incremental decoding error" >>= fun () ->
|
||||||
return_none
|
return_none
|
||||||
| Await decode_next_buf ->
|
| Await decode_next_buf ->
|
||||||
|
@ -74,7 +74,7 @@ val authenticate:
|
|||||||
[P2P_io_scheduler.connection] into an [authenticated_connection] (auth
|
[P2P_io_scheduler.connection] into an [authenticated_connection] (auth
|
||||||
correct, acceptation undecided). *)
|
correct, acceptation undecided). *)
|
||||||
|
|
||||||
val kick: 'meta authenticated_connection -> unit Lwt.t
|
val kick: 'meta authenticated_connection -> P2p_point.Id.t list -> unit Lwt.t
|
||||||
(** (Low-level) (Cancelable) [kick afd] notifies the remote peer that
|
(** (Low-level) (Cancelable) [kick afd] notifies the remote peer that
|
||||||
we refuse this connection and then closes [afd]. Used in
|
we refuse this connection and then closes [afd]. Used in
|
||||||
[P2p_connection_pool] to reject an [authenticated_connection] which we do
|
[P2p_connection_pool] to reject an [authenticated_connection] which we do
|
||||||
@ -90,7 +90,7 @@ val accept:
|
|||||||
authenticated_connection. Used in [P2p_connection_pool], to promote an
|
authenticated_connection. Used in [P2p_connection_pool], to promote an
|
||||||
[authenticated_connection] to the status of an active peer. *)
|
[authenticated_connection] to the status of an active peer. *)
|
||||||
|
|
||||||
val check_binary_chunks_size: int -> unit tzresult Lwt.t
|
val check_binary_chunks_size: int -> unit tzresult Lwt.t
|
||||||
(** Precheck for the [?binary_chunks_size] parameter of [accept]. *)
|
(** Precheck for the [?binary_chunks_size] parameter of [accept]. *)
|
||||||
|
|
||||||
(** {1 IO functions on connections} *)
|
(** {1 IO functions on connections} *)
|
||||||
|
Loading…
Reference in New Issue
Block a user