File tree Expand file tree Collapse file tree
fendermint/vm/interpreter/src/fvm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ where
141141 // Asynchronously broadcast signature, if validating.
142142 if let Some ( ref ctx) = self . validator_ctx {
143143 // Do not resend past signatures.
144- if !self . syncing ( ) . await ? {
144+ if !self . syncing ( ) . await {
145145 // Fetch any incomplete checkpoints synchronously because the state can't be shared across threads.
146146 let incomplete_checkpoints =
147147 checkpoint:: unsigned_checkpoints ( & self . gateway , & mut state, ctx. public_key )
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ pub mod store;
1616pub mod bundle;
1717pub ( crate ) mod topdown;
1818
19- use anyhow:: Context ;
2019pub use check:: FvmCheckRet ;
2120pub use checkpoint:: PowerUpdates ;
2221pub use exec:: FvmApplyRet ;
@@ -101,13 +100,15 @@ where
101100 C : Client + Sync ,
102101{
103102 /// Indicate that the node is syncing with the rest of the network and hasn't caught up with the tip yet.
104- async fn syncing ( & self ) -> anyhow:: Result < bool > {
105- let status: tendermint_rpc:: endpoint:: status:: Response = self
106- . client
107- . status ( )
108- . await
109- . context ( "failed to get Tendermint status" ) ?;
110-
111- Ok ( status. sync_info . catching_up )
103+ async fn syncing ( & self ) -> bool {
104+ match self . client . status ( ) . await {
105+ Ok ( status) => status. sync_info . catching_up ,
106+ Err ( e) => {
107+ // CometBFT often takes a long time to boot, e.g. while it's replaying blocks it won't
108+ // respond to JSON-RPC calls. Let's treat this as an indication that we are syncing.
109+ tracing:: warn!( error =? e, "failed to get CometBFT sync status" ) ;
110+ true
111+ }
112+ }
112113 }
113114}
You can’t perform that action at this time.
0 commit comments