switch back to original fork

This commit is contained in:
Anton Kaliaev 2018-09-17 13:25:17 +04:00
parent ff9d0cdfb6
commit e1bda36c6c
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
6 changed files with 26 additions and 28 deletions

16
Gopkg.lock generated
View File

@ -1,13 +1,6 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:5da259989116f6ab5e05a80086c639c82efdbdb799ca07183eb0b660edfd91fe"
name = "github.com/DataDog/leveldb"
packages = ["."]
pruneopts = "UT"
revision = "12a0b6e10a5bf779330ed8b7c0f1f39f212d34e2"
[[projects]]
branch = "master"
digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d"
@ -168,6 +161,13 @@
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
version = "v1.0"
[[projects]]
digest = "1:39b27d1381a30421f9813967a5866fba35dc1d4df43a6eefe3b7a5444cb07214"
name = "github.com/jmhodges/levigo"
packages = ["."]
pruneopts = "UT"
revision = "c42d9e0ca023e2198120196f842701bb4c55d7b9"
[[projects]]
branch = "master"
digest = "1:a64e323dc06b73892e5bb5d040ced475c4645d456038333883f58934abbf6f72"
@ -511,7 +511,6 @@
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/DataDog/leveldb",
"github.com/btcsuite/btcutil/base58",
"github.com/btcsuite/btcutil/bech32",
"github.com/ebuchman/fail-test",
@ -530,6 +529,7 @@
"github.com/golang/protobuf/proto",
"github.com/golang/protobuf/ptypes/timestamp",
"github.com/gorilla/websocket",
"github.com/jmhodges/levigo",
"github.com/pkg/errors",
"github.com/prometheus/client_golang/prometheus",
"github.com/prometheus/client_golang/prometheus/promhttp",

View File

@ -73,8 +73,8 @@
## Pin to revision
[[override]]
name = "github.com/DataDog/leveldb"
revision = "12a0b6e10a5bf779330ed8b7c0f1f39f212d34e2"
name = "github.com/jmhodges/levigo"
revision = "c42d9e0ca023e2198120196f842701bb4c55d7b9"
[[constraint]]
name = "github.com/ebuchman/fail-test"

View File

@ -77,22 +77,24 @@ make install
## Compile with CLevelDB support
Make sure you have a roughly compatible version of libstdc++ (tested with
5.3.1). For example, on Ubuntu:
Install [LevelDB](https://github.com/google/leveldb) (minimum version is 1.7)
with snappy. Example for Ubuntu:
```
sudo apt-get update
sudo apt-get install gcc
sudo apt-cache show libstdc++6
Version: 5.3.1-14ubuntu2
```
sudo apt install build-essential
Check out leveldb dependency using git (for some reason dep does not check out
submodules):
sudo apt-get install libsnappy-dev
```
cd vendor/github.com/DataDog && rm -rf leveldb
git clone https://github.com/DataDog/leveldb.git
wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \
tar -zxvf v1.20.tar.gz && \
cd leveldb-1.20/ && \
make && \
sudo scp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \
cd include/ && \
sudo scp -r leveldb /usr/local/include/ && \
sudo ldconfig && \
rm -f v1.20.tar.gz
```
Set database backend to cleveldb:
@ -105,5 +107,5 @@ db_backend = "cleveldb"
To build Tendermint, run
```
CGO_ENABLED=1 CGO_CXXFLAGS_ALLOW="(-fno-builtin-memcmp|-lpthread)" CGO_CFLAGS_ALLOW="-fno-builtin-memcmp" go build -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD`" -tags "tendermint gcc" -o build/tendermint ./cmd/tendermint/
CGO_LDFLAGS="-lsnappy" go build -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD`" -tags "tendermint gcc" -o build/tendermint ./cmd/tendermint/
```

View File

@ -1,4 +0,0 @@
test_gcc:
CGO_CXXFLAGS_ALLOW="(-fno-builtin-memcmp|-lpthread)" CGO_CFLAGS_ALLOW="-fno-builtin-memcmp" go test -tags gcc
.PHONY: test_gcc

View File

@ -7,7 +7,7 @@ import (
"fmt"
"path/filepath"
levigo "github.com/DataDog/leveldb"
"github.com/jmhodges/levigo"
)
func init() {

View File

@ -196,7 +196,7 @@ func benchmarkTxIndex(txsCount int64, b *testing.B) {
}
defer os.RemoveAll(dir) // nolint: errcheck
store := db.NewDB("tx_index", "bboltdb", dir)
store := db.NewDB("tx_index", "leveldb", dir)
indexer := NewTxIndex(store)
batch := txindex.NewBatch(txsCount)