Beispiel #1
0
        public MptCommandTest()
        {
            _command = new MptCommand();

            _pathA = NewTempPath();
            _pathB = NewTempPath();
            using var stateKeyValueStoreA = new DefaultKeyValueStore(_pathA);
            using var stateKeyValueStoreB = new DefaultKeyValueStore(_pathB);
            _trieA = new MerkleTrie(stateKeyValueStoreA).Set(
                ImmutableDictionary <string, IValue> .Empty
                .Add("deleted", Null.Value)
                .Add("common", (Text)"before")).Commit();
            _trieB = new MerkleTrie(stateKeyValueStoreB).Set(
                ImmutableDictionary <string, IValue> .Empty
                .Add("created", Null.Value)
                .Add("common", (Text)"after")).Commit();
        }
Beispiel #2
0
 public DefaultKeyValueStoreTest()
 {
     // Memory mode.
     KeyValueStore = _defaultKeyValueStore = new DefaultKeyValueStore(null);
     InitializePreStoredData();
 }