Yumin Xia
36d7180ca2
libs/db: close batch ( #3397 )
ClevelDB requires closing when WriteBatch is no longer needed, https://godoc.org/github.com/jmhodges/levigo#WriteBatch.Close
Fixes the memory leak in https://github.com/cosmos/cosmos-sdk/issues/3842
6 years ago
Yumin Xia
b021f1e505
libs/db: close batch ( #3397 )
ClevelDB requires closing when WriteBatch is no longer needed, https://godoc.org/github.com/jmhodges/levigo#WriteBatch.Close
Fixes the memory leak in https://github.com/cosmos/cosmos-sdk/issues/3842
6 years ago
Anton Kaliaev
d470945503
update gometalinter to 3.0.0 ( #3233 )
in the attempt to fix https://circleci.com/gh/tendermint/tendermint/43165
also
code is simplified by running gofmt -s .
remove unused vars
enable linters we're currently passing
remove deprecated linters
6 years ago
Thane Thomson
a335caaedb
alias amino imports ( #3219 )
As per conversation here: https://github.com/tendermint/tendermint/pull/3218#discussion_r251364041
This is the result of running the following code on the repo:
```bash
find . -name '*.go' | grep -v 'vendor/' | xargs -n 1 goimports -w
```
6 years ago
Anton Kaliaev
c4a1cfc5c2
don't ignore key when executing CONTAINS ( #2924 )
Fixes #2912
6 years ago
Anton Kaliaev
5413c11150
kv indexer: add separator to start key when matching ranges ( #2925 )
* kv indexer: add separator to start key when matching ranges
to avoid including false positives
Refs #2908
* refactor code
* add a test case
6 years ago
Anton Kaliaev
92dc5fc77a
don't return false positives when searching for a prefix of a tag value ( #2919 )
Fixes #2908
6 years ago
Anton Kaliaev
94e63be922
[indexer] order results by index if height is the same ( #2900 )
Fixes #2775
6 years ago
Anton Kaliaev
9570ac4d3e
rpc: Fix tx.height range queries ( #2899 )
Modify lookForHeight to return a height only there's a equal operator.
Previously, it was returning a height even for range conditions: "height
< 10000".
Fixes #2759
6 years ago
Anton Kaliaev
e1bda36c6c
switch back to original fork
6 years ago
Anton Kaliaev
ff9d0cdfb6
generate random txs
otherwise we're benchmarking overriding single key (because hash stays
the same!)
6 years ago
cong
d27cd972d2
Index tx.height ( #2324 )
Refs #2051
6 years ago
Anton Kaliaev
fc7c298cc0
Remove gogoproto from Makefile's TOOLS ( #2198 )
* remove gogoproto from tools
because it's not a binary
* update protobuf version to 3.6.1 in `make get_protoc`
* update libs/common/types.pb.go and rpc/grpc/types.pb.go
* fix app tests
6 years ago
Anton Kaliaev
60378fd7f9
abci: remove fee ( #2043 )
Refs #1861
We don't use the fee field and its likely just confusing.
We can add backwards compatible priority (instead of fee) later.
Note priority is better than fee because it lets the app do the math on how to rank order transactions, rather than forcing that into tendermint (ie. if we return fee, priority would be fee/gas)
7 years ago
Zach Ramsay
44dad6d70b
Revert "detele everything"
This reverts commit d02c5d1e30
.
7 years ago
Zach Ramsay
d02c5d1e30
detele everything
7 years ago
Ethan Buchman
d55243f0e6
fix import paths
7 years ago
Alexander Simmerl
a605b66c5a
Move abci imports
7 years ago
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
7 years ago
Liamsi
96a3502126
delete everything
7 years ago
Anton Kaliaev
bb9aa85d22
copy events and pubsub packages from tmlibs
Refs #847
7 years ago
Anton Kaliaev
58e3246ffc
batch index txs
7 years ago
Ethan Buchman
c68d406195
fix tests
7 years ago
Jae Kwon
89cdde7f1e
Fix state tests
7 years ago
Thomas Corbière
2644a529f0
Fix lint errors ( #1390 )
* use increment and decrement operators.
* remove unnecessary else branches.
* fix package comment with leading space.
* fix receiver names.
* fix error strings.
* remove omittable code.
* remove redundant return statement.
* Revert changes (code is generated.)
* use cfg as receiver name for all config-related types.
* use lsi as the receiver name for the LastSignedInfo type.
7 years ago
Anton Kaliaev
2b63f57b4c
fix tx_indexer's matchRange
before we're using IteratePrefix, which is wrong because we want full
range, not just "account.number=1".
7 years ago
Anton Kaliaev
4085c72496
sort /tx_search results by height by default
Refs #1366
7 years ago
Anton Kaliaev
116a4ec705
temporary fix
I assume there is a deeper issue with how UnmarshalBinary works in
go-amino (i.e., when loading array of some objects, the empty array
becomes []object{nil}). Note when Marshaling, the object is nil.
7 years ago
Ethan Buchman
656854186c
state: fix txResult issue with UnmarshalBinary into ptr
7 years ago
Ethan Buchman
eaafd9d61c
state: builds
7 years ago
Anton Kaliaev
bb2bdbc0e1
add missing element (tag.Value) to keyForTag
encoded as %s. not sure this will work with raw bytes
7 years ago
Ethan Buchman
cd0fd06b0d
update for sdk2 libs. need to fix kv test
NOTE we only updating for tmlibs and abci
7 years ago
Zach
12c5a57415
determinisitic linter ( #902 )
* linter: address gosimple lints
* linter: make deterministic & a rebase fix
* lint/rpc: fix a gosimple lint
* run linter in CI
* fix rebase mistake
* fix makefile
* ugh
* revert Makefile
* add metalinter to CI
* try this
* linter: last little fix
* need glide
* better
* okayy circle, have it your way
* lints: gosimple
* pr comments
7 years ago
Ethan Buchman
9af8da7aad
update for new abci int types
7 years ago
Anton Kaliaev
6423306980
TestIndexAllTags (unit)
7 years ago
Anton Kaliaev
c5b62ce1ee
correct abci version
7 years ago
Anton Kaliaev
e538e0e077
config variable to index all tags
7 years ago
Anton Kaliaev
66ad366a4f
test searching for tx with multiple same tags
7 years ago
Anton Kaliaev
864ad8546e
more test cases
7 years ago
Anton Kaliaev
a762253e24
do not use AddBatch, prefer copying for now
7 years ago
Anton Kaliaev
10d893ee9b
update deps
7 years ago
Anton Kaliaev
acbc0717d4
add client methods
7 years ago
Anton Kaliaev
1e19860585
fixes from my own review
7 years ago
Anton Kaliaev
09941b9aa9
fix metalinter warnings
7 years ago
Anton Kaliaev
91f2184003
fixes after bucky's review
7 years ago
Anton Kaliaev
ea0b205455
searching transaction results
7 years ago
Anton Kaliaev
29cd1a1b8f
rewrite indexer to be a listener of eventBus
7 years ago
Anton Kaliaev
a52cdbfe43
extract tags from DeliverTx/Result
and send them along with predefined
7 years ago
Zach Ramsay
6f3c05545d
fix new linting errors
7 years ago
Zach Ramsay
d7cb291fb2
errcheck; sort some stuff out
7 years ago