From b42ea96ea8547eb6a78f25e74df60e7ae1291205 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 23 Oct 2025 21:14:52 +0800 Subject: Revert "refactor: use tx for transaction" This reverts commit 24f842410b670d7db9e22cda1e804a5d8141e7fa. --- src/network.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/network.rs') diff --git a/src/network.rs b/src/network.rs index 7d72761..aa7a296 100644 --- a/src/network.rs +++ b/src/network.rs @@ -113,7 +113,7 @@ impl Network { }); let this_connect = this.clone(); spawn(async move { - Network::try_peer(this_connect, "192.168.1.11:6767").await; + Network::try_peer(this_connect, "192.168.1.16:6767").await; }); Network::get_idb(this); } @@ -124,7 +124,7 @@ impl Network { }); } - pub async fn new_block(this: Arc>, tx: Transaction) -> Block { + pub async fn new_block(this: Arc>, trans: Transaction) -> Block { let bc = { this.lock() .await @@ -133,7 +133,7 @@ impl Network { }; bc.lock() .await - .new_block(tx) + .new_block(trans) } pub async fn broadcast(this: Arc>, data: Request) { @@ -247,7 +247,7 @@ impl Peer { .await .store((*block).clone()) } else { - println!("Mining new block for transaction: {:#?}", block.tx); + println!("Mining new block for transaction: {:#?}", block.trans); let mut mine = (*block).clone(); mine.calc_set_pow() .await; -- cgit v1.2.3