Skip to content

Commit

Permalink
writing blocks to db
Browse files Browse the repository at this point in the history
  • Loading branch information
aditiharini committed Nov 8, 2024
1 parent 686c5cd commit 67d33e4
Show file tree
Hide file tree
Showing 6 changed files with 314 additions and 63 deletions.
157 changes: 157 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'snapchain'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'setup'",
"cargo": {
"args": [
"build",
"--bin=setup",
"--package=snapchain"
],
"filter": {
"name": "setup",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'setup'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=setup",
"--package=snapchain"
],
"filter": {
"name": "setup",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'snapchain'",
"cargo": {
"args": [
"build",
"--bin=snapchain",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "bin"
}
},
"args": ["--id", "1"],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'snapchain'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=snapchain",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'submit-message'",
"cargo": {
"args": [
"build",
"--bin=submit-message",
"--package=snapchain"
],
"filter": {
"name": "submit-message",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'submit-message'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=submit-message",
"--package=snapchain"
],
"filter": {
"name": "submit-message",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'consensus_test'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=consensus_test",
"--package=snapchain"
],
"filter": {
"name": "consensus_test",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ url = "2.5.3"
alloy-transport = "0.5.4"
alloy-sol-types = "0.8.11"
ed25519-dalek = "2.1.1"
rocksdb = {version="0.22.0", features=["multi-threaded-cf"]}
rocksdb = {git = "https://github.com/rust-rocksdb/rust-rocksdb.git", features=["multi-threaded-cf"]}
walkdir = "2.5.0"

[build-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub struct Config {
pub fnames: connectors::fname::Config,
pub onchain_events: connectors::onchain_events::Config,
pub consensus: consensus::consensus::Config,
pub rocksdb_dir: String,
}

impl Default for Config {
Expand All @@ -25,6 +26,7 @@ impl Default for Config {
fnames: connectors::fname::Config::default(),
onchain_events: connectors::onchain_events::Config::default(),
consensus: consensus::consensus::Config::default(),
rocksdb_dir: ".rocks".to_string(),
}
}
}
Expand Down
Loading

0 comments on commit 67d33e4

Please sign in to comment.