Bladeren bron

consensus/proto: change log type on subscriber receive error

This will not show protocol subscribers error messages when a peer disconnects from our node, which is irrelevant to protocol execution
aggstam 3 jaren geleden
bovenliggende
commit
5e9fa27667

+ 1 - 1
src/consensus/proto/protocol_proposal.rs

@@ -70,7 +70,7 @@ impl ProtocolProposal {
             let proposal = match self.proposal_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolProposal::handle_receive_proposal(): recv fail: {}", e);
+                    debug!("ProtocolProposal::handle_receive_proposal(): recv fail: {}", e);
                     continue
                 }
             };

+ 4 - 4
src/consensus/proto/protocol_sync.rs

@@ -86,7 +86,7 @@ impl ProtocolSync {
             let order = match self.request_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolSync::handle_receive_request(): recv fail: {}", e);
+                    debug!("ProtocolSync::handle_receive_request(): recv fail: {}", e);
                     continue
                 }
             };
@@ -118,7 +118,7 @@ impl ProtocolSync {
             let info = match self.block_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolSync::handle_receive_block(): recv fail: {}", e);
+                    debug!("ProtocolSync::handle_receive_block(): recv fail: {}", e);
                     continue
                 }
             };
@@ -173,7 +173,7 @@ impl ProtocolSync {
             let request = match self.slot_checkpoin_request_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!(
+                    debug!(
                         "ProtocolSync::handle_receive_slot_checkpoint_request(): recv fail: {}",
                         e
                     );
@@ -220,7 +220,7 @@ impl ProtocolSync {
             let slot_checkpoint = match self.slot_checkpoints_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolSync::handle_receive_slot_checkpoint(): recv fail: {}", e);
+                    debug!("ProtocolSync::handle_receive_slot_checkpoint(): recv fail: {}", e);
                     continue
                 }
             };

+ 2 - 2
src/consensus/proto/protocol_sync_consensus.rs

@@ -73,7 +73,7 @@ impl ProtocolSyncConsensus {
             let req = match self.request_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolSyncConsensus::handle_receive_request() recv fail: {}", e);
+                    debug!("ProtocolSyncConsensus::handle_receive_request() recv fail: {}", e);
                     continue
                 }
             };
@@ -113,7 +113,7 @@ impl ProtocolSyncConsensus {
             let req = match self.slot_checkpoints_request_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolSyncConsensus::handle_receive_slot_checkpoints_request() recv fail: {}", e);
+                    debug!("ProtocolSyncConsensus::handle_receive_slot_checkpoints_request() recv fail: {}", e);
                     continue
                 }
             };

+ 1 - 1
src/consensus/proto/protocol_tx.rs

@@ -76,7 +76,7 @@ impl ProtocolTx {
             let tx = match self.tx_sub.receive().await {
                 Ok(v) => v,
                 Err(e) => {
-                    error!("ProtocolTx::handle_receive_tx(): recv fail: {}", e);
+                    debug!("ProtocolTx::handle_receive_tx(): recv fail: {}", e);
                     continue
                 }
             };

+ 2 - 2
src/consensus/validator.rs

@@ -22,8 +22,8 @@ use async_std::sync::{Arc, RwLock};
 use darkfi_sdk::{
     crypto::{
         constants::MERKLE_DEPTH,
-        //contract_id::MONEY_CONTRACT_ID,
-        contract_id::{DAO_CONTRACT_ID, MONEY_CONTRACT_ID},
+        contract_id::MONEY_CONTRACT_ID,
+        //contract_id::{DAO_CONTRACT_ID, MONEY_CONTRACT_ID},
         schnorr::{SchnorrPublic, SchnorrSecret},
         MerkleNode,
         PublicKey,