|
@@ -81,7 +81,7 @@ impl ProtocolSync {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async fn handle_receive_request(self: Arc<Self>) -> Result<()> {
|
|
async fn handle_receive_request(self: Arc<Self>) -> Result<()> {
|
|
|
- debug!("ProtocolSync::handle_receive_request() [START]");
|
|
|
|
|
|
|
+ debug!(target: "consensus::protocol_sync::handle_receive_request()", "ProtocolSync::handle_receive_request() [START]");
|
|
|
loop {
|
|
loop {
|
|
|
let order = match self.request_sub.receive().await {
|
|
let order = match self.request_sub.receive().await {
|
|
|
Ok(v) => v,
|
|
Ok(v) => v,
|
|
@@ -135,6 +135,7 @@ impl ProtocolSync {
|
|
|
let slot = participating.unwrap();
|
|
let slot = participating.unwrap();
|
|
|
if current >= slot {
|
|
if current >= slot {
|
|
|
debug!(
|
|
debug!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
|
|
"ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
|
|
|
);
|
|
);
|
|
@@ -155,6 +156,7 @@ impl ProtocolSync {
|
|
|
self.p2p.broadcast_with_exclude(info_copy, &exclude_list).await
|
|
self.p2p.broadcast_with_exclude(info_copy, &exclude_list).await
|
|
|
{
|
|
{
|
|
|
error!(
|
|
error!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_block(): p2p broadcast fail: {}",
|
|
"ProtocolSync::handle_receive_block(): p2p broadcast fail: {}",
|
|
|
e
|
|
e
|
|
@@ -176,6 +178,7 @@ impl ProtocolSync {
|
|
|
Ok(v) => v,
|
|
Ok(v) => v,
|
|
|
Err(e) => {
|
|
Err(e) => {
|
|
|
debug!(
|
|
debug!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): recv fail: {}",
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): recv fail: {}",
|
|
|
e
|
|
e
|
|
@@ -202,6 +205,7 @@ impl ProtocolSync {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
debug!(
|
|
debug!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): Found {} slot checkpoints",
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): Found {} slot checkpoints",
|
|
|
slot_checkpoints.len()
|
|
slot_checkpoints.len()
|
|
@@ -210,6 +214,7 @@ impl ProtocolSync {
|
|
|
let response = SlotCheckpointResponse { slot_checkpoints };
|
|
let response = SlotCheckpointResponse { slot_checkpoints };
|
|
|
if let Err(e) = self.channel.send(response).await {
|
|
if let Err(e) = self.channel.send(response).await {
|
|
|
error!(
|
|
error!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): channel send fail: {}",
|
|
"ProtocolSync::handle_receive_slot_checkpoint_request(): channel send fail: {}",
|
|
|
e
|
|
e
|
|
@@ -242,6 +247,7 @@ impl ProtocolSync {
|
|
|
let slot = participating.unwrap();
|
|
let slot = participating.unwrap();
|
|
|
if current >= slot {
|
|
if current >= slot {
|
|
|
debug!(
|
|
debug!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
|
|
"ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
|
|
|
);
|
|
);
|
|
@@ -251,6 +257,7 @@ impl ProtocolSync {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
info!(
|
|
info!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_slot_checkpoint(): Received slot checkpoint: {}",
|
|
"ProtocolSync::handle_receive_slot_checkpoint(): Received slot checkpoint: {}",
|
|
|
slot_checkpoint.slot
|
|
slot_checkpoint.slot
|
|
@@ -274,6 +281,7 @@ impl ProtocolSync {
|
|
|
.await
|
|
.await
|
|
|
{
|
|
{
|
|
|
error!(
|
|
error!(
|
|
|
|
|
+ target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
target: "consensus::protocol_sync::handle_receive_request()",
|
|
|
"ProtocolSync::handle_receive_slot_checkpoint(): p2p broadcast fail: {}",
|
|
"ProtocolSync::handle_receive_slot_checkpoint(): p2p broadcast fail: {}",
|
|
|
e
|
|
e
|