MCPcopy Create free account
hub / github.com/PacktPublishing/Rust-for-Blockchain-Application-Development / send_tx

Function send_tx

chapter 4/server.rs:143–153  ·  view source on GitHub ↗
(addr: &str, tx: &Transaction)

Source from the content-addressed store, hash-verified

141}
142
143pub fn send_tx(addr: &str, tx: &Transaction) {
144 let socket_addr = addr.parse().unwrap();
145 let node_addr = GLOBAL_CONFIG.get_node_addr().parse().unwrap();
146 send_data(
147 socket_addr,
148 Package::Tx {
149 addr_from: node_addr,
150 transaction: tx.serialize(),
151 },
152 );
153}
154
155fn send_version(addr: &str, height: usize) {
156 let socket_addr = addr.parse().unwrap();

Callers 2

serveFunction · 0.70
mainFunction · 0.50

Calls 3

send_dataFunction · 0.70
get_node_addrMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected