Skip to content

Commit

Permalink
fix pathes after rename
Browse files Browse the repository at this point in the history
  • Loading branch information
devintegral3 committed Oct 2, 2019
1 parent 6519055 commit d6089ef
Show file tree
Hide file tree
Showing 138 changed files with 421 additions and 420 deletions.
2 changes: 1 addition & 1 deletion .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ exclude_paths:
- 'spec/**/*'
- 'benchmarks/**/*'
- '*.min.js'
- 'src/**/*.pb.go'
- '**/*.pb.go'
- '**/tests/**'
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ builds:
binary: go-lachesis-dummy
ldflags:
- -linkmode external -extldflags -static -s -w
- -X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit={{ .ShortCommit }}
- -X github.com/Fantom-foundation/go-lachesis/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -19,7 +19,7 @@ builds:
binary: go-lachesis-dummy-client
ldflags:
- -linkmode external -extldflags -static -s -w
- -X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit={{ .ShortCommit }}
- -X github.com/Fantom-foundation/go-lachesis/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -30,7 +30,7 @@ builds:
binary: go-lachesis
ldflags:
- -linkmode external -extldflags -static -s -w
- -X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit={{ .ShortCommit }}
- -X github.com/Fantom-foundation/go-lachesis/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -41,7 +41,7 @@ builds:
binary: go-lachesis-with-profiler
ldflags:
- -linkmode external -extldflags -static -s -w
- -X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit={{ .ShortCommit }}
- -X github.com/Fantom-foundation/go-lachesis/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -52,7 +52,7 @@ builds:
binary: go-lachesis-network
ldflags:
- -linkmode external -extldflags -static -s -w
- -X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit={{ .ShortCommit }}
- -X github.com/Fantom-foundation/go-lachesis/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export CGO_ENABLED=0
SUBDIRS := src/.
TARGETS := build proto clean buildtests
SUBDIR_TARGETS := $(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS)))
VENDOR_LDFLAG := --ldflags "-X github.com/Fantom-foundation/go-lachesis/src/version.GitCommit=`git rev-parse HEAD`"
VENDOR_LDFLAG := --ldflags "-X github.com/Fantom-foundation/go-lachesis/version.GitCommit=`git rev-parse HEAD`"

ifeq ($(OS),Windows_NT)
# EXTLDFLAGS := ""
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Building `lachesis` requires both a Go (version 1.12 or later) and a C compiler.
them using your favourite package manager. Once the dependencies are installed, run

```shell
go build -o ./build/lachesis ./src/cmd
go build -o ./build/lachesis ./cmd
```
The build output is ```build/lachesis``` executable.

Expand Down Expand Up @@ -89,7 +89,7 @@ One of the quickest ways to get Lachesis up and running on your machine is by us
Docker:

```shell
cd src/docker
cd docker/
make
docker run -d --name lachesis-node -v /home/alice/lachesis:/root \
-p 5050:5050 \
Expand Down Expand Up @@ -119,21 +119,21 @@ docker logs lachesis-node

Lachesis has extensive unit-testing. Use the Go tool to run tests:
```shell
go test ./src/...
go test ./...
```

If everything goes well, it should output something along these lines:
```
? github.com/Fantom-foundation/go-lachesis/src/event_check/basic_check [no test files]
? github.com/Fantom-foundation/go-lachesis/src/event_check/epoch_check [no test files]
? github.com/Fantom-foundation/go-lachesis/src/event_check/heavy_check [no test files]
? github.com/Fantom-foundation/go-lachesis/src/event_check/parents_check [no test files]
ok github.com/Fantom-foundation/go-lachesis/src/evm_core (cached)
ok github.com/Fantom-foundation/go-lachesis/src/gossip (cached)
? github.com/Fantom-foundation/go-lachesis/src/gossip/fetcher [no test files]
? github.com/Fantom-foundation/go-lachesis/src/gossip/occured_txs [no test files]
ok github.com/Fantom-foundation/go-lachesis/src/gossip/ordering (cached)
ok github.com/Fantom-foundation/go-lachesis/src/gossip/packs_downloader (cached)
? github.com/Fantom-foundation/go-lachesis/event_check/basic_check [no test files]
? github.com/Fantom-foundation/go-lachesis/event_check/epoch_check [no test files]
? github.com/Fantom-foundation/go-lachesis/event_check/heavy_check [no test files]
? github.com/Fantom-foundation/go-lachesis/event_check/parents_check [no test files]
ok github.com/Fantom-foundation/go-lachesis/evm_core (cached)
ok github.com/Fantom-foundation/go-lachesis/gossip (cached)
? github.com/Fantom-foundation/go-lachesis/gossip/fetcher [no test files]
? github.com/Fantom-foundation/go-lachesis/gossip/occured_txs [no test files]
ok github.com/Fantom-foundation/go-lachesis/gossip/ordering (cached)
ok github.com/Fantom-foundation/go-lachesis/gossip/packs_downloader (cached)
```

### Operating a private network
Expand All @@ -160,14 +160,14 @@ $ lachesis --fakenet 1/5 --bootnodes "enode://ade7067fe5495db3d9f44dfda710a2873f

For the testing purposes, the full demo may be launched using:
```shell
cd src/docker
cd docker/
make # build docker image
./start.sh # start the containers
./stop.sh # stop the demo
```

The full demo doesn't spin up very fast. To avoid the full docker image building, you may run the integration test instead:
```shell
go test -v ./src/integration/...
go test -v ./integration/...
```
Adjust test duration, number of nodes and logs verbosity in the test source code.
8 changes: 4 additions & 4 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"github.com/naoina/toml"
"gopkg.in/urfave/cli.v1"

"github.com/Fantom-foundation/go-lachesis/src/evm_core"
"github.com/Fantom-foundation/go-lachesis/src/gossip"
"github.com/Fantom-foundation/go-lachesis/src/gossip/gasprice"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/evm_core"
"github.com/Fantom-foundation/go-lachesis/gossip"
"github.com/Fantom-foundation/go-lachesis/gossip/gasprice"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/consolecmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/lachesis/genesis"
"github.com/Fantom-foundation/go-lachesis/lachesis/genesis"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions cmd/emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
cli "gopkg.in/urfave/cli.v1"

"github.com/Fantom-foundation/go-lachesis/src/crypto"
"github.com/Fantom-foundation/go-lachesis/src/gossip"
"github.com/Fantom-foundation/go-lachesis/crypto"
"github.com/Fantom-foundation/go-lachesis/gossip"
)

// setCoinbase retrieves the etherbase either from the directly specified
Expand Down
4 changes: 2 additions & 2 deletions cmd/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ethereum/go-ethereum/node"
cli "gopkg.in/urfave/cli.v1"

"github.com/Fantom-foundation/go-lachesis/src/crypto"
"github.com/Fantom-foundation/go-lachesis/src/integration"
"github.com/Fantom-foundation/go-lachesis/crypto"
"github.com/Fantom-foundation/go-lachesis/integration"
)

var FakeNetFlag = cli.StringFlag{
Expand Down
2 changes: 1 addition & 1 deletion cmd/fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/crypto"
"github.com/Fantom-foundation/go-lachesis/crypto"
)

func TestFakeNetFlag(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"github.com/ethereum/go-ethereum/node"
"gopkg.in/urfave/cli.v1"

"github.com/Fantom-foundation/go-lachesis/src/debug"
"github.com/Fantom-foundation/go-lachesis/src/gossip"
"github.com/Fantom-foundation/go-lachesis/src/integration"
"github.com/Fantom-foundation/go-lachesis/debug"
"github.com/Fantom-foundation/go-lachesis/gossip"
"github.com/Fantom-foundation/go-lachesis/integration"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/common"

"github.com/Fantom-foundation/go-lachesis/src/cmd/cmdtest"
"github.com/Fantom-foundation/go-lachesis/cmd/cmdtest"
)

func tmpdir(t *testing.T) string {
Expand Down
4 changes: 2 additions & 2 deletions common/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/Fantom-foundation/go-lachesis/src/common/bigendian"
"github.com/Fantom-foundation/go-lachesis/src/common/littleendian"
"github.com/Fantom-foundation/go-lachesis/common/bigendian"
"github.com/Fantom-foundation/go-lachesis/common/littleendian"
)

func Test_IntToBytes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN export GIT_COMMIT=$(git rev-list -1 HEAD) && \
export CGO_ENABLED=1 && \
go build -ldflags "-s -w -X main.gitCommit=$GIT_COMMIT -X main.gitDate=$GIT_DATE" \
-o /tmp/lachesis \
./src/cmd
./cmd



Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ all: build

.PHONY: build
build:
cd ../../ && docker build -f src/docker/Dockerfile -t "lachesis" .
cd ../ && docker build -f docker/Dockerfile -t "lachesis" .
8 changes: 4 additions & 4 deletions ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ import (
"github.com/ethereum/go-ethereum/rpc"
"github.com/tyler-smith/go-bip39"

"github.com/Fantom-foundation/go-lachesis/src/event_check/basic_check"
"github.com/Fantom-foundation/go-lachesis/src/evm_core"
"github.com/Fantom-foundation/go-lachesis/src/hash"
"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/event_check/basic_check"
"github.com/Fantom-foundation/go-lachesis/evm_core"
"github.com/Fantom-foundation/go-lachesis/hash"
"github.com/Fantom-foundation/go-lachesis/inter"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions ethapi/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"

"github.com/Fantom-foundation/go-lachesis/src/evm_core"
"github.com/Fantom-foundation/go-lachesis/src/hash"
"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/evm_core"
"github.com/Fantom-foundation/go-lachesis/hash"
"github.com/Fantom-foundation/go-lachesis/inter"
)

// Backend interface provides the common API services (that are provided by
Expand Down
12 changes: 6 additions & 6 deletions event_check/all.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package event_check

import (
"github.com/Fantom-foundation/go-lachesis/src/event_check/basic_check"
"github.com/Fantom-foundation/go-lachesis/src/event_check/epoch_check"
"github.com/Fantom-foundation/go-lachesis/src/event_check/heavy_check"
"github.com/Fantom-foundation/go-lachesis/src/event_check/parents_check"
"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/event_check/basic_check"
"github.com/Fantom-foundation/go-lachesis/event_check/epoch_check"
"github.com/Fantom-foundation/go-lachesis/event_check/heavy_check"
"github.com/Fantom-foundation/go-lachesis/event_check/parents_check"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/lachesis"
"github.com/ethereum/go-ethereum/core/types"
)

Expand Down
2 changes: 1 addition & 1 deletion event_check/ban.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package event_check
import (
"errors"

"github.com/Fantom-foundation/go-lachesis/src/event_check/epoch_check"
"github.com/Fantom-foundation/go-lachesis/event_check/epoch_check"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions event_check/basic_check/basic_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/evm_core"
"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/evm_core"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions event_check/epoch_check/epoch_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package epoch_check
import (
"errors"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/inter/idx"
"github.com/Fantom-foundation/go-lachesis/src/inter/pos"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/inter/idx"
"github.com/Fantom-foundation/go-lachesis/inter/pos"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions event_check/heavy_check/heavy_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/ethereum/go-ethereum/core/types"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions event_check/parents_check/parents_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package parents_check
import (
"errors"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/inter/idx"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/inter/idx"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions evm_core/apply_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/src/inter/idx"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-lachesis/inter/idx"
"github.com/Fantom-foundation/go-lachesis/lachesis"
)

// GenesisMismatchError is raised when trying to overwrite an existing
Expand Down
10 changes: 5 additions & 5 deletions evm_core/apply_genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/stretchr/testify/assert"

"github.com/Fantom-foundation/go-lachesis/src/kvdb/memorydb"
"github.com/Fantom-foundation/go-lachesis/src/kvdb/no_key_is_err"
"github.com/Fantom-foundation/go-lachesis/src/kvdb/table"
"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/src/logger"
"github.com/Fantom-foundation/go-lachesis/kvdb/memorydb"
"github.com/Fantom-foundation/go-lachesis/kvdb/no_key_is_err"
"github.com/Fantom-foundation/go-lachesis/kvdb/table"
"github.com/Fantom-foundation/go-lachesis/lachesis"
"github.com/Fantom-foundation/go-lachesis/logger"
)

func TestApplyGenesis(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions evm_core/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/lachesis"
"github.com/Fantom-foundation/go-lachesis/src/lachesis/genesis"
"github.com/Fantom-foundation/go-lachesis/lachesis"
"github.com/Fantom-foundation/go-lachesis/lachesis/genesis"
)

func BenchmarkInsertChain_empty_memdb(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion evm_core/chain_makers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/params"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/inter"
)

// BlockGen creates blocks for testing.
Expand Down
2 changes: 1 addition & 1 deletion evm_core/dummy_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"

"github.com/Fantom-foundation/go-lachesis/src/inter"
"github.com/Fantom-foundation/go-lachesis/inter"
)

type (
Expand Down
Loading

0 comments on commit d6089ef

Please sign in to comment.