Commit Graph

356 Commits

Author SHA1 Message Date
Jae Kwon b25df389db Remove Bytes, just use []byte; Use protobuf for KVPair/KI64Pair 2017-12-26 04:40:35 -08:00
Jae Kwon bf644b0984 Do not shadow assert 2017-12-26 00:36:58 -08:00
Jae Kwon 6ec8c1602f Update Makefile 2017-12-25 22:41:40 -08:00
Jae Kwon 797bcdd9e0 Remove common/http 2017-12-25 17:46:21 -08:00
Jae Kwon f2a8e95248 Add KI64Pair(s) 2017-12-25 11:40:05 -08:00
Jae Kwon b70ae4919b Update glide file 2017-12-19 20:47:22 -08:00
Jae Kwon ca56a274bd Nil bytes are OK for Get/Set etc
And s/Release/Close/g
2017-12-19 20:36:37 -08:00
Jae Kwon 4ce8448d7f
Nil keys are OK, deprecate BeginningKey/EndingKey (#101)
* Nil keys are OK, deprecate BeginningKey/EndingKey
2017-12-17 13:11:28 -08:00
Jae Kwon aab2d70dd3
Sdk2 kvpair (#102)
* Canonical KVPair in common
* Simplify common/Bytes to just hex encode
2017-12-17 13:04:15 -08:00
Ethan Buchman 9226659413
Merge pull request #98 from tendermint/sdk2-iterator
Sdk2 iterator
2017-12-15 15:58:48 -05:00
Ethan Buchman 66b0e8fa2d fix c level db iterator 2017-12-15 15:58:23 -05:00
Ethan Buchman 225eace316 dont run metalinter on circle ... 2017-12-15 15:14:48 -05:00
Emmanuel Odeke a7b20d4e46
db: Simplify exists check, fix IsKeyInDomain signature, Iterator Close
+ *FSDB.HasKey now uses common.FileExists to test for file existence
+ IsKeyInDomain takes key as a []byte slice instead of as a string
to avoid extraneous []byte<-->string conversions for start and end
+ Iterator.Close() instead of Iterator.Release()
+ withDB helper to encapsulate DB creation, deferred cleanups
so that for loops can use opened DBs and discard them ASAP

Addressing accepted changes from review with @jaekwon
2017-12-15 02:58:51 -07:00
Ethan Buchman a2f7898b6d db: fix c and go iterators 2017-12-13 22:28:37 -05:00
Ethan Buchman d4aeca8ce3 fixes from @melekes 2017-12-13 20:11:11 -05:00
Ethan Buchman 318982c0ba checkKeyCondition -> IsKeyInDomain 2017-12-13 01:34:00 -05:00
Jae Kwon 5636a02d03 Remove GetError() from Iterator 2017-12-12 19:19:26 -08:00
Ethan Buchman edf07760d6 db: fsdb iterator 2017-12-12 21:08:38 -05:00
Ethan Buchman bcacaf164b db: cleveldb iterator 2017-12-12 20:58:35 -05:00
Ethan Buchman 3e5dbef6a2 db: goleveldb iterator 2017-12-12 20:38:03 -05:00
Ethan Buchman 39e40ff5ce db: memdb iterator 2017-12-12 20:06:50 -05:00
Ethan Buchman bb115d4d61 cleanupDBDir 2017-12-12 19:28:52 -05:00
Ethan Buchman ba8c5045b5 db: fixes to fsdb and clevledb 2017-12-12 19:22:08 -05:00
Ethan Buchman c547caf04f db: some test cleanup 2017-12-12 19:08:22 -05:00
Ethan Buchman 5b7f90dfb2 db: test panic on nil key 2017-12-12 18:42:47 -05:00
Ethan Buchman 781f6c5d22 db: some comments in types.go 2017-12-12 18:04:05 -05:00
Jae Kwon 7f650cea86 Remove Prev from Iterator 2017-12-12 14:45:31 -08:00
Jae Kwon 0d03cd9e31 Make it compile 2017-12-12 14:00:03 -08:00
Jae Kwon 50a30aafc1 New canonical Iterator 2017-12-12 12:44:47 -08:00
Jae Kwon a0b692c86d Add PushBytes to Heap 2017-12-10 14:23:27 -08:00
Jae Kwon 03dfb724c7 Change heap.Push to mean int priority 2017-12-10 10:18:35 -08:00
Jae Kwon 988e190ef7 Deprecated Panic* 2017-12-09 09:26:03 -08:00
Jae Kwon 17dc8a7449 SetDeleter/Batch separation 2017-12-03 21:44:48 -08:00
Jae Kwon 56e51bc113 CacheWrap() -> CacheDB() CacheDB 2017-11-11 17:37:30 -05:00
Jae Kwon 8481c49c82
CacheDB (#67)
* Add CacheDB & SimpleMap
* Generic memBatch; Fix cLevelDB tests
* CacheWrap() for CacheDB and MemDB
* Change Iterator to match LeviGo Iterator
* Fixes from review
* cacheWrapWriteMutex and some race fixes
* Use tmlibs/common
* NewCWWMutex is exposed.  DB can be CacheWrap'd
* Remove GetOK, not needed
* Fsdb (#72)
* Add FSDB
* Review fixes from Anton
* Review changes
* Fixes from review
2017-11-09 17:42:32 -05:00
Anton Kaliaev 176c2ceed6
Merge pull request #77 from tendermint/18-unsupported-value-type
encode complex types as "%+v"
2017-11-07 21:29:54 -05:00
Anton Kaliaev 798848320f
Merge pull request #76 from tendermint/29-log-logger-errors
log logger's errors
2017-11-07 21:29:35 -05:00
Anton Kaliaev 69447564b8
encode complex types as "%+v" (Refs #18) 2017-11-06 15:44:21 -05:00
Anton Kaliaev 4b989151ed
log logger's errors (Refs #29) 2017-11-06 14:18:42 -05:00
Anton Kaliaev ac0cf0b2e2
Merge pull request #74 from tendermint/73-undefined-syscall-kill
use os.Process#Kill (Fixes #73)
2017-11-04 09:07:03 -05:00
Anton Kaliaev 49d75e223e
use os.Process#Kill (Fixes #73) 2017-11-04 08:14:47 -05:00
Anton Kaliaev b658294a13
use assert.Contains in cmap_test 2017-11-04 00:10:59 -05:00
Wolf 88481fc363 Make iterating over keys possible (#63)
* Make iterating over keys possible

* add test for cmap
- test Keys() and Values() respectively

* one cmap per test-case
2017-11-04 00:06:20 -05:00
Anton Kaliaev 0f555f8d2c
Merge pull request #71 from tendermint/69-read-impl-and-tests
[autofile] test GroupReader more extensively (Refs #69)
2017-11-04 00:02:02 -05:00
Anton Kaliaev d8dd497069
fix metalinter errors 2017-10-30 13:01:18 -05:00
Anton Kaliaev 668698584d
[autofile] test GroupReader more extensively (Refs #69) 2017-10-30 12:48:51 -05:00
Ethan Buchman d9525c0fb6
Merge pull request #70 from tendermint/develop
Develop
2017-10-27 12:05:43 -04:00
Ethan Buchman b14c996698 update changelog 2017-10-27 11:52:10 -04:00
Ethan Buchman 092eb701c7 cmn: Kill 2017-10-27 11:01:40 -04:00
Ethan Buchman 42145a82bd version and changelog 2017-10-26 20:57:33 -04:00