Skip to content

Commit

Permalink
Update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
hacker-volodya committed Nov 29, 2024
1 parent 168e953 commit 71ee086
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
14 changes: 8 additions & 6 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ futures-util = "0.3"
axum = "0.7.2"
ton_block = { git = "https://github.com/broxus/ton-labs-block.git", features = ["ton"] }
prometheus = { version = "0.13.3", features = ["process"] }
ton_liteapi = { git = "https://github.com/tonstack/lite-client", branch = "async" }
ton_liteapi = "0.2.0"
adnl = "2.0.0"
ton_types = { git = "https://github.com/broxus/ton-labs-types.git" }
tower = { version = "0.4.13" }
hex = "0.4"
Expand Down
8 changes: 6 additions & 2 deletions src/liteserver.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{sync::Arc, task::Poll, time::Duration};

use adnl::crypto::{KeyPair, SecretKey};
use anyhow::{anyhow, Result};
use base64::Engine as _;
use broxus_util::now;
Expand Down Expand Up @@ -226,7 +227,8 @@ impl LiteServer {
mode: (),
account: Some(Int256(tx.account_addr.to_owned().get_next_bytes(32)?.try_into().unwrap())),
lt: Some(tx.lt),
hash: Some(Int256(*tx.hash()?.as_array()))
hash: Some(Int256(*tx.hash()?.as_array())),
metadata: None,
});
let should_continue = ids.len() < req.count as usize;
Ok(should_continue)
Expand Down Expand Up @@ -965,7 +967,9 @@ pub fn run(engine: Arc<Engine>, config: GlobalConfig) {
.unwrap()
.try_into()
.unwrap();
let key = StaticSecret::from(key);
let key = KeyPair::from(&SecretKey::from_bytes(key));

tracing::info!("Public key is: {}", base64::encode(key.public_key.to_bytes()));

// TODO: configurable layers, rate limiting by ip/adnl
let service = ServiceBuilder::new()
Expand Down

0 comments on commit 71ee086

Please sign in to comment.