|
@@ -88,6 +88,7 @@ impl ProtocolSync {
|
|
|
if !self.consensus_mode {
|
|
if !self.consensus_mode {
|
|
|
let info_copy = (*info).clone();
|
|
let info_copy = (*info).clone();
|
|
|
if !self.state.read().await.blockchain.has_block(&info_copy)? {
|
|
if !self.state.read().await.blockchain.has_block(&info_copy)? {
|
|
|
|
|
+ debug!("ProtocolSync::handle_receive_block(): Appending block to ledger");
|
|
|
self.state.write().await.blockchain.add(&[info_copy.clone()])?;
|
|
self.state.write().await.blockchain.add(&[info_copy.clone()])?;
|
|
|
self.state.write().await.remove_txs(info_copy.txs.clone())?;
|
|
self.state.write().await.remove_txs(info_copy.txs.clone())?;
|
|
|
self.p2p.broadcast(info_copy).await?;
|
|
self.p2p.broadcast(info_copy).await?;
|