mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-25 03:11:21 +00:00
feat: adding rpc interfaces into sequencer and node
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
use anyhow::Result;
|
||||
use log::info;
|
||||
use rpc_primitives::RpcConfig;
|
||||
use sequencer_rpc::new_http_server;
|
||||
|
||||
pub async fn main_runner() -> Result<()> {
|
||||
env_logger::init();
|
||||
|
||||
let http_server = new_http_server(RpcConfig::default())?;
|
||||
info!("HTTP server started");
|
||||
let _http_server_handle = http_server.handle();
|
||||
tokio::spawn(http_server);
|
||||
|
||||
loop {
|
||||
//ToDo: Insert activity into main loop
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,16 @@
|
||||
//ToDo: Add sequencer_runner module
|
||||
use anyhow::Result;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
use sequencer_runner::main_runner;
|
||||
|
||||
pub const NUM_THREADS: usize = 4;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
actix::System::with_tokio_rt(|| {
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
.worker_threads(NUM_THREADS)
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap()
|
||||
})
|
||||
.block_on(main_runner())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user