Open hiasr opened 6 months ago
When creating a tree from an existing db, the following error occurs:
thread 'main' panicked at .../rust_verkle/verkle-trie/src/database/generic.rs:145:72: called `Result::unwrap()` on an `Err` value: InvalidData
If you run the following example twice, you will see the error on the second run.
fn test_rocksdb() { let keys = (0..1000).map(|_| generate_rand_address()); let kvs = keys.clone().map(|key| (key, key)); let db: VerkleDb<RocksDb> = VerkleDb::from_path("dbs/test_rocksdb"); let mut trie = Trie::new(DefaultConfig::new(db)); trie.insert(kvs.clone()); trie.flush_database(); } fn generate_rand_address() -> [u8; 32] { let mut rng = rand::thread_rng(); let mut address = [0u8; 32]; rng.fill_bytes(&mut address); address }
When creating a tree from an existing db, the following error occurs:
If you run the following example twice, you will see the error on the second run.