mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 05:24:42 -04:00
Move test functions out of lib
This commit is contained in:
parent
61a8a3e428
commit
bf576bf251
4 changed files with 57 additions and 33 deletions
|
@ -88,19 +88,6 @@ pub enum State {
|
|||
State6(State6),
|
||||
}
|
||||
|
||||
// TODO: use macro or generics
|
||||
pub fn is_state4(state: &State) -> bool {
|
||||
matches!(state, State::State4 { .. })
|
||||
}
|
||||
// TODO: use macro or generics
|
||||
pub fn is_state5(state: &State) -> bool {
|
||||
matches!(state, State::State5 { .. })
|
||||
}
|
||||
// TODO: use macro or generics
|
||||
pub fn is_state6(state: &State) -> bool {
|
||||
matches!(state, State::State6 { .. })
|
||||
}
|
||||
|
||||
macro_rules! impl_try_from_parent_state {
|
||||
($type:ident) => {
|
||||
impl TryFrom<State> for $type {
|
||||
|
|
|
@ -124,16 +124,6 @@ impl_from_child_state!(State3);
|
|||
impl_from_child_state!(State4);
|
||||
impl_from_child_state!(State5);
|
||||
|
||||
// TODO: use macro or generics
|
||||
pub fn is_state5(state: &State) -> bool {
|
||||
matches!(state, State::State5 { .. })
|
||||
}
|
||||
|
||||
// TODO: use macro or generics
|
||||
pub fn is_state3(state: &State) -> bool {
|
||||
matches!(state, State::State3 { .. })
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct State0 {
|
||||
b: bitcoin::SecretKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue