diff --git a/Cargo.toml b/Cargo.toml index a516138..c3ca80d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nb" -version = "0.3.0" +version = "0.3.1" authors = ["xxchan ", "Keith Null "] edition = "2018" diff --git a/src/node.rs b/src/node.rs index ba8a766..d964213 100644 --- a/src/node.rs +++ b/src/node.rs @@ -334,8 +334,8 @@ impl Node { let last_hash = last_block.get_hash(); // receive a reward for finding the proof. // The sender is "0" to signify that this node has mined a new coin. - // TODO: This bonus transaction should not broadcast - self.create_and_add_new_transaction("0", &self.basic_info.id.clone(), 1); + let bonus_trans = Transaction::new("0", &self.basic_info.id.clone(), 1); + self.chain.add_new_transaction(&bonus_trans); let block = self.chain.create_new_block(proof, last_hash); info!(