feat(miniprotocols): Implement tx submission client (#220)
* feat(miniprotocols): Implement tx submission client * Match CDDL specs * Fix build errors * Add server implementation for txsubmission Also includes some documentation for how to use both the client and the server * cargo fmt * clippy suggestions clippy pls * Fail explicitly on missing n2c unix socket --------- Co-authored-by: Pi Lanningham <pi@sundaeswap.finance>
This commit is contained in:
parent
5edb456c70
commit
16d0211c5b
19 changed files with 785 additions and 355 deletions
|
|
@ -54,7 +54,7 @@ fn do_chainsync(channel: multiplexer::StdChannel) {
|
|||
log::info!("rolling forward, block size: {}", h.len())
|
||||
}
|
||||
chainsync::NextResponse::RollBackward(x, _) => log::info!("rollback to {:?}", x),
|
||||
chainsync::NextResponse::Await => log::info!("tip of chaing reached"),
|
||||
chainsync::NextResponse::Await => log::info!("tip of chain reached"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -66,8 +66,12 @@ fn main() {
|
|||
|
||||
// we connect to the unix socket of the local node. Make sure you have the right
|
||||
// path for your environment
|
||||
#[cfg(target_family = "unix")]
|
||||
let bearer = Bearer::connect_unix("/tmp/node.socket").unwrap();
|
||||
|
||||
#[cfg(not(target_family = "unix"))]
|
||||
panic!("can't use n2c unix socket on non-unix systems");
|
||||
|
||||
// setup the multiplexer by specifying the bearer and the IDs of the
|
||||
// miniprotocols to use
|
||||
let mut plexer = multiplexer::StdPlexer::new(bearer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue