Commit Graph

14 Commits

Author SHA1 Message Date
Christopher Goes 147cf9f897
Move GasKVStore to /store 2018-05-16 01:14:30 +02:00
Ethan Frey c73f08c845 Make GetStoreByName private, as only needed by MultiStore Query 2018-02-06 17:20:29 -05:00
Ethan Frey 57b28d95de Add GetStoreByName to MultiStore to help with Query lookups 2018-02-06 17:20:29 -05:00
Jae Kwon c6bad0b325 Add first Basecoin test harness 2018-01-26 06:54:03 -08:00
Jae Kwon be665d53fe Substore->Store; BaseApp has db; Mapper 2018-01-22 06:20:46 -08:00
Ethan Buchman 5e46eea616 types and store compile 2018-01-12 19:17:17 -08:00
Jae Kwon 45c2e9c30b curVersion -> nextVersion 2017-12-21 03:44:27 -08:00
Jae Kwon eb1f877d3d
KVStore refactor (#303)
I removed that stuff about cwwMutex and CacheWraps expiring. It was unnecessary complexity given that users need not write concurrent logic. If you have 2 CacheKVStores and you Write on one and later you Write on the other one, they will both write, and strange things may happen. But that’s OK, it’s kinda the expected (unsurprising) behavior. And now the code is much simpler.

Also I got rid of IterKVStore. It’s not necessary to distinguish them because we can have KVStore.Iterator() return nil or panic or an empty iterator. Further simplification…

KVStore.CacheKVStore() doesn’t exist. No need, just call NewCacheKVStore(parent).

Originally I wanted the .CacheKVStore() method because you can make the implementor be responsible for ensuring that returned CacheWraps don’t trample each other. But as written previously this complicates the code a lot more and it isn’t strictly necessary. It’s a kind of magic that maybe should just be avoided.

sdk.Iterator is dbm.Iterator. The plan is to conservatively add more aliases into the “sdk” namespace.

GetError() is removed from Iterator. We need to just panic to be consistent. More simplification.
2017-12-12 20:13:51 -08:00
Jae Kwon a47da2c8e1 store/* fixes 2017-12-04 00:56:25 -08:00
Jae Kwon 1d207a2a5e Fixing store/* bugs... 2017-12-04 00:23:10 -08:00
Jae Kwon 0917fc3de7 rootMultiStore holds lastCommitID 2017-12-03 23:17:10 -08:00
Jae Kwon 8db15fe3ef Committer -> CommitStore; CacheWrap() 2017-12-03 22:55:15 -08:00
Ethan Buchman 51f522f8d8 fix some compile errors 2017-12-03 21:41:02 -08:00
Jae Kwon 3474efc599 Cleanup multistore 2017-12-01 08:52:54 -08:00