Closed cschuchardt88 closed 1 year ago
Options set the snapshot, so get use the snapshot
@shargon Thank You for your time. Second question Im using bare ISnapshot interface like this
public void StartBatch()
{
_snapshot?.Dispose();
_snapshot = _store.GetSnapshot();
}
_store = NeoSystem.LoadStore(@"C:\Temp\UT_HelloWorld");
But the snapshot is private, no way to access it? Is there a better way of getting what was written to the snapshot?
I want to be able to do
_snapshot.TryGet(new byte[1]);
and get that key's value from snapshot when i insert the data to snapshot before committing to store.
if there is no solution, i guess i could just cache the data in my class before writing it to the store.
Ill just cache before committing
Can anyone tell why ISnapshot Interface on method TryGet doesn't get the data from snapshot? Why does it get the Data from IStore Interface. This is for leveldb storage.
https://github.com/neo-project/neo-modules/blob/99ffc846e4df93491d1d812cb4c6ef6ee875e056/src/LevelDBStore/Plugins/Storage/Snapshot.cs#L65