mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Fix rpc coded response display (#1470)
Prevent errors to be printed in debug mode
This commit is contained in:
@@ -366,7 +366,7 @@ impl<T: EthSpec> std::fmt::Display for RPCCodedResponse<T> {
|
|||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
RPCCodedResponse::Success(res) => write!(f, "{}", res),
|
RPCCodedResponse::Success(res) => write!(f, "{}", res),
|
||||||
RPCCodedResponse::Error(code, err) => write!(f, "{}: {:?}", code, err),
|
RPCCodedResponse::Error(code, err) => write!(f, "{}: {}", code, err.to_string()),
|
||||||
RPCCodedResponse::StreamTermination(_) => write!(f, "Stream Termination"),
|
RPCCodedResponse::StreamTermination(_) => write!(f, "Stream Termination"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user