Start state transition verification + refactors

This commit is contained in:
Carl Lerche
2017-07-07 10:33:04 -07:00
parent a15f06ea7c
commit f6b6d0c7e8
16 changed files with 351 additions and 100 deletions

View File

@@ -75,7 +75,13 @@ pub trait Peer {
/// Message type polled from the transport
type Poll;
fn check_initiating_id(id: StreamId) -> Result<(), ConnectionError>;
/// Returns `true` if `id` is a valid StreamId for a stream initiated by the
/// local node.
fn is_valid_local_stream_id(id: StreamId) -> bool;
/// Returns `true` if `id` is a valid StreamId for a stream initiated by the
/// remote node.
fn is_valid_remote_stream_id(id: StreamId) -> bool;
#[doc(hidden)]
fn convert_send_message(