cbbeb66b5b
* added cargo config file to explicitly specify build target * wip * Config option to disable topology refreshing * extracted common parsing code * helper trait for working on wasm topology * wasm topology parsing * restored (slightly modified) old js-example * wip * Moved message preparation into a trait * wip * long-winded way of sending test packet * standalone NymNodeTester * finishing the test upon receiving all packets even if timeout wasnt reached * initial round of cleanup * sending multiple test packets in normal NymClient * javascript-side cleanup * starting mixnode test on btn click * Improved NymNodeTester constructors * improved error handling and constructors * tester utils error handling * further cleanup + using BTreeMap for NymTopology mixnodes * handling missed errors * splitting up 'test_node' * split up and cleaned up generation of test result * clippy + fixed example * post rebase fixes * another broken test * prevent running multiple parallel tests * cargo fmt * Added nym- prefix to node tester utils
47 lines
1.1 KiB
Rust
47 lines
1.1 KiB
Rust
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
pub mod error;
|
|
pub mod message;
|
|
pub mod receiver;
|
|
pub mod tester;
|
|
|
|
pub use message::{Empty, TestMessage};
|
|
pub use tester::NodeTester;
|
|
|
|
// it feels wrong to redefine it, but I don't want to import the whole of contract commons just for this one type
|
|
pub(crate) type MixId = u32;
|
|
|
|
#[macro_export]
|
|
macro_rules! log_err {
|
|
($($t:tt)*) => {{
|
|
#[cfg(target_arch = "wasm32")]
|
|
{::wasm_utils::console_error!($($t)*)}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
{::log::error!($($t)*)}
|
|
}};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! log_warn {
|
|
($($t:tt)*) => {{
|
|
#[cfg(target_arch = "wasm32")]
|
|
{::wasm_utils::console_warn!($($t)*)}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
{::log::warn!($($t)*)}
|
|
}};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! log_info {
|
|
($($t:tt)*) => {{
|
|
#[cfg(target_arch = "wasm32")]
|
|
{::wasm_utils::console_log!($($t)*)}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
{::log::info!($($t)*)}
|
|
}};
|
|
}
|