Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit ca150c4

Browse files
committed
Update LSPS1 error codes
.. to account for the spec changes in BitcoinAndLightningLayerSpecs/lsp#88 In particular we also introduce the `CLIENT_REJECTED` error as part of LSPS0, but currently don't use it (yet).
1 parent fd4dd7c commit ca150c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lsps0/ser.rs

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub(crate) const JSONRPC_ERROR_FIELD_KEY: &str = "error";
4242
pub(crate) const JSONRPC_INVALID_MESSAGE_ERROR_CODE: i32 = -32700;
4343
pub(crate) const JSONRPC_INVALID_MESSAGE_ERROR_MESSAGE: &str = "parse error";
4444

45+
pub(crate) const _LSPS0_CLIENT_REJECTED_ERROR_CODE: i32 = 001;
46+
4547
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
4648
pub(crate) enum LSPSMethod {
4749
LSPS0ListProtocols,

src/lsps1/msgs.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ pub(crate) const LSPS1_CREATE_ORDER_METHOD_NAME: &str = "lsps1.create_order";
2121
pub(crate) const LSPS1_GET_ORDER_METHOD_NAME: &str = "lsps1.get_order";
2222

2323
pub(crate) const LSPS1_CREATE_ORDER_REQUEST_INVALID_PARAMS_ERROR_CODE: i32 = -32602;
24-
pub(crate) const LSPS1_CREATE_ORDER_REQUEST_ORDER_MISMATCH_ERROR_CODE: i32 = 1000;
25-
pub(crate) const LSPS1_CREATE_ORDER_REQUEST_CLIENT_REJECTED_ERROR_CODE: i32 = 1001;
26-
pub(crate) const LSPS1_CREATE_ORDER_REQUEST_INVALID_TOKEN_ERROR_CODE: i32 = 2;
24+
pub(crate) const LSPS1_CREATE_ORDER_REQUEST_ORDER_MISMATCH_ERROR_CODE: i32 = 100;
2725

2826
/// The identifier of an order.
2927
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Hash)]

0 commit comments

Comments
 (0)