Skip to content

Commit

Permalink
feat: switching to axum, adding swagger UI
Browse files Browse the repository at this point in the history
  • Loading branch information
distractedm1nd committed Jul 19, 2024
1 parent 9d71b25 commit aa9a8fb
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 260 deletions.
240 changes: 238 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ key_transparency = []
ci = []

[dependencies]
axum = "0.6"
tower-http = { version = "0.4", features = ["cors"] }
utoipa = { version = "3.3", features = ["axum_extras"] }
utoipa-swagger-ui = { version = "3.1", features = ["axum"] }
crypto-hash = "0.3.4"
async-trait = "0.1.68"
serde = { version = "1.0.151", features = ["derive"] }
Expand Down
5 changes: 3 additions & 2 deletions src/node_types/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ impl NodeType for Sequencer {

let main_loop = self.clone().main_loop();
let da_loop = self.clone().da_loop();
let ws = self.clone().ws.start(self.clone());

let ws_self = self.clone();
let ws = ws_self.ws.start(self.clone());

tokio::select! {
_ = main_loop => Ok(()),
Expand Down Expand Up @@ -201,7 +203,6 @@ impl Sequencer {
};

self.db.set_epoch(&epoch)?;
self.db.reset_epoch_operation_counter()?;

// add the commitment for the operations ran since the last epoch
let current_commitment = self
Expand Down
Loading

0 comments on commit aa9a8fb

Please sign in to comment.