Remove Protocol::Unsupported

This commit is contained in:
Luke Parker
2023-03-13 08:03:13 -04:00
parent 0e0243639e
commit 48078d0b4b
3 changed files with 6 additions and 6 deletions

View File

@@ -45,6 +45,8 @@ pub enum RpcError {
ConnectionError,
#[error("invalid node")]
InvalidNode,
#[error("unsupported protocol version ({0})")]
UnsupportedProtocol(usize),
#[error("transactions not found")]
TransactionsNotFound(Vec<[u8; 32]>),
#[error("invalid point ({0})")]
@@ -211,7 +213,7 @@ impl Rpc {
{
13 | 14 => Protocol::v14,
15 | 16 => Protocol::v16,
version => Protocol::Unsupported(version),
protocol => Err(RpcError::UnsupportedProtocol(protocol))?,
},
)
}