You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
517 B

  1. use std::collections::HashMap;
  2. #[macro_use]
  3. extern crate arrayref;
  4. extern crate tiny_keccak;
  5. extern crate rustc_hex;
  6. mod utils;
  7. mod node;
  8. // const TYPENODEROOT: u8 = 4;
  9. const EMPTYNODEVALUE: [u8;32] = [0;32];
  10. pub struct TestValue {
  11. bytes: Vec<u8>,
  12. index_length: u32,
  13. }
  14. pub trait Value {
  15. fn bytes(&self) -> &Vec<u8>;
  16. fn index_length(&self) -> u32;
  17. }
  18. impl Value for TestValue {
  19. fn bytes(&self) -> &Vec<u8> {
  20. &self.bytes
  21. }
  22. fn index_length(&self) -> u32 {
  23. self.index_length
  24. }
  25. }