feat: Improve multiplexer ergonomics (#111)
This commit is contained in:
parent
4ea3e134c0
commit
159d38020c
18 changed files with 242 additions and 261 deletions
|
|
@ -250,7 +250,7 @@ where
|
|||
self.on_intersect_found(point, tip)
|
||||
}
|
||||
(State::Intersect, Message::IntersectNotFound(tip)) => self.on_intersect_not_found(tip),
|
||||
(_, msg) => Err(MachineError::InvalidMsgForState(self.state, msg)),
|
||||
(state, msg) => Err(MachineError::invalid_msg::<Self>(state, &msg)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ impl Agent for TipFinder {
|
|||
self.on_intersect_found(tip)
|
||||
}
|
||||
(State::Intersect, Message::IntersectNotFound(tip)) => self.on_intersect_not_found(tip),
|
||||
(state, msg) => Err(MachineError::InvalidMsgForState(state.clone(), msg)),
|
||||
(state, msg) => Err(MachineError::invalid_msg::<Self>(state, &msg)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,5 +45,11 @@ impl Deref for BlockContent {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<BlockContent> for Vec<u8> {
|
||||
fn from(other: BlockContent) -> Self {
|
||||
other.0
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SkippedContent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue