mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
move slab.rs, slabstore.rs and rocks.rs to separated dir
This commit is contained in:
@@ -4,7 +4,8 @@ use easy_parallel::Parallel;
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use drk::service::{ClientProgramOptions, GatewayClient};
|
||||
use drk::{rocks::Rocks, slab::Slab, Result};
|
||||
use drk::Result;
|
||||
use drk::blockchain::{Slab, Rocks};
|
||||
|
||||
fn setup_addr(address: Option<SocketAddr>, default: SocketAddr) -> SocketAddr {
|
||||
match address {
|
||||
@@ -92,9 +93,8 @@ mod test {
|
||||
fn test_darkfid_client() {
|
||||
use std::path::Path;
|
||||
|
||||
use drk::rocks::Rocks;
|
||||
use drk::blockchain::{Rocks, Slab};
|
||||
use drk::service::GatewayClient;
|
||||
use drk::slab::Slab;
|
||||
|
||||
use log::*;
|
||||
use rand::Rng;
|
||||
|
||||
@@ -6,7 +6,7 @@ use async_executor::Executor;
|
||||
use easy_parallel::Parallel;
|
||||
|
||||
use drk::service::{GatewayService, ProgramOptions};
|
||||
use drk::{rocks::Rocks, Result};
|
||||
use drk::{blockchain::Rocks, Result};
|
||||
|
||||
fn setup_addr(address: Option<SocketAddr>, default: SocketAddr) -> SocketAddr {
|
||||
match address {
|
||||
|
||||
8
src/blockchain/mod.rs
Normal file
8
src/blockchain/mod.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
pub mod slab;
|
||||
pub mod slabstore;
|
||||
pub mod rocks;
|
||||
|
||||
pub use rocks::Rocks;
|
||||
pub use slab::Slab;
|
||||
pub use slabstore::SlabStore;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::rocks::{columns, IteratorMode, Rocks};
|
||||
use crate::serial::{deserialize, serialize};
|
||||
use crate::{slab::Slab, Result};
|
||||
use crate::Result;
|
||||
|
||||
use super::slab::Slab;
|
||||
use super::rocks::{columns, IteratorMode, Rocks};
|
||||
|
||||
pub struct SlabStore {
|
||||
rocks: Rocks,
|
||||
@@ -16,15 +16,13 @@ pub mod net;
|
||||
pub mod rpc;
|
||||
pub mod serial;
|
||||
pub mod service;
|
||||
pub mod slab;
|
||||
pub mod slabstore;
|
||||
pub mod blockchain;
|
||||
pub mod state;
|
||||
pub mod system;
|
||||
pub mod tx;
|
||||
pub mod vm;
|
||||
pub mod vm_serial;
|
||||
pub mod wallet;
|
||||
pub mod rocks;
|
||||
|
||||
pub use crate::bls_extensions::BlsStringConversion;
|
||||
pub use crate::error::{Error, Result};
|
||||
|
||||
@@ -3,10 +3,10 @@ use std::convert::From;
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use super::reqrep::{PeerId, Publisher, RepProtocol, Reply, ReqProtocol, Request, Subscriber};
|
||||
use crate::{
|
||||
rocks::Rocks, serial::deserialize, serial::serialize, slab::Slab, slabstore::SlabStore, Error,
|
||||
use crate::{serial::deserialize, serial::serialize, Error,
|
||||
Result,
|
||||
};
|
||||
use crate::blockchain::{Rocks, Slab, SlabStore};
|
||||
|
||||
use async_executor::Executor;
|
||||
use log::*;
|
||||
|
||||
Reference in New Issue
Block a user