add modules configs, use timestamp_sec instead of timestamp_ms

This commit is contained in:
Alexey Proshutinskiy 2021-05-19 01:10:41 +03:00
parent 069817a489
commit 1a2c68aca1
3 changed files with 17 additions and 3 deletions

10
aqua-dht_cfg.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "aqua-dht",
"mem_page_count": 1,
"preopened_files": [
"/tmp"
],
"mapped_dirs": {
"tmp": "./tmp"
}
}

4
sqlite3_cfg.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "sqlite3",
"mem_pages_count": 100
}

View File

@ -33,11 +33,11 @@ module_manifest!();
pub static KEYS_TABLE_NAME: &str = "dht_keys"; pub static KEYS_TABLE_NAME: &str = "dht_keys";
pub static VALUES_TABLE_NAME: &str = "dht_values"; pub static VALUES_TABLE_NAME: &str = "dht_values";
pub static DB_PATH: &str = "/tmp/dht.db"; pub static DB_PATH: &str = "/tmp/dht.db";
pub static STALE_VALUE_AGE: u64 = 60 * 60 * 1000; pub static STALE_VALUE_AGE: u64 = 60 * 60;
pub static EXPIRED_VALUE_AGE: u64 = 24 * 60 * 60 * 1000; pub static EXPIRED_VALUE_AGE: u64 = 24 * 60 * 60;
pub static TRUSTED_TIMESTAMP_SERVICE_ID: &str = "peer"; pub static TRUSTED_TIMESTAMP_SERVICE_ID: &str = "peer";
pub static TRUSTED_TIMESTAMP_FUNCTION_NAME: &str = "timestamp_ms"; pub static TRUSTED_TIMESTAMP_FUNCTION_NAME: &str = "timestamp_sec";
fn main() { fn main() {
create_keys_table(); create_keys_table();