mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-01 21:05:43 +00:00
docs: specify TM version in go tutorials (#5427)
Closes https://github.com/tendermint/tendermint/issues/5425
This commit is contained in:
@@ -40,14 +40,7 @@ Verify that you have the latest version of Go installed:
|
||||
|
||||
```bash
|
||||
$ go version
|
||||
go version go1.13.1 darwin/amd64
|
||||
```
|
||||
|
||||
Make sure you have `$GOPATH` environment variable set:
|
||||
|
||||
```bash
|
||||
$ echo $GOPATH
|
||||
/Users/melekes/go
|
||||
go version go1.15.1 darwin/amd64
|
||||
```
|
||||
|
||||
## 1.2 Creating a new Go project
|
||||
@@ -585,17 +578,37 @@ We are going to use [Go modules](https://github.com/golang/go/wiki/Modules) for
|
||||
dependency management.
|
||||
|
||||
```bash
|
||||
export GO111MODULE=on
|
||||
go mod init github.com/me/example
|
||||
go build
|
||||
```
|
||||
|
||||
This should build the binary.
|
||||
This should create a `go.mod` file. The current tutorial only works with
|
||||
tendermint > v0.34, so let's make sure we're using the latest version:
|
||||
|
||||
```go
|
||||
module github.com/me/example
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/dgraph-io/badger v1.6.2
|
||||
github.com/tendermint/tendermint v0.34.0-rc4
|
||||
)
|
||||
```
|
||||
|
||||
Now we can build the binary:
|
||||
|
||||
```bash
|
||||
go build
|
||||
```
|
||||
|
||||
To create a default configuration, nodeKey and private validator files, let's
|
||||
execute `tendermint init`. But before we do that, we will need to install
|
||||
Tendermint Core. Please refer to [the official
|
||||
guide](https://docs.tendermint.com/master/introduction/install.html). If you're
|
||||
installing from source, don't forget to checkout the latest release (`git checkout vX.Y.Z`).
|
||||
installing from source, don't forget to checkout the latest release (`git
|
||||
checkout vX.Y.Z`). Don't forget to check that the application uses the same
|
||||
major version.
|
||||
|
||||
```bash
|
||||
$ rm -rf /tmp/example
|
||||
|
||||
@@ -43,14 +43,7 @@ Verify that you have the latest version of Go installed:
|
||||
|
||||
```bash
|
||||
$ go version
|
||||
go version go1.14.x darwin/amd64
|
||||
```
|
||||
|
||||
Make sure you have `$GOPATH` environment variable set:
|
||||
|
||||
```bash
|
||||
echo $GOPATH
|
||||
/Users/melekes/go
|
||||
go version go1.15.1 darwin/amd64
|
||||
```
|
||||
|
||||
## 1.2 Creating a new Go project
|
||||
@@ -254,7 +247,6 @@ func (app *KVStoreApplication) BeginBlock(req abcitypes.RequestBeginBlock) abcit
|
||||
app.currentBatch = app.db.NewTransaction(true)
|
||||
return abcitypes.ResponseBeginBlock{}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Here we create a batch, which will store block's transactions.
|
||||
@@ -444,16 +436,35 @@ dependency management.
|
||||
```bash
|
||||
export GO111MODULE=on
|
||||
go mod init github.com/me/example
|
||||
go build
|
||||
```
|
||||
|
||||
This should build the binary.
|
||||
This should create a `go.mod` file. The current tutorial only works with
|
||||
tendermint > v0.34, so let's make sure we're using the latest version:
|
||||
|
||||
```go
|
||||
module github.com/me/example
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/dgraph-io/badger v1.6.2
|
||||
github.com/tendermint/tendermint v0.34.0-rc4
|
||||
)
|
||||
```
|
||||
|
||||
Now we can build the binary:
|
||||
|
||||
```bash
|
||||
go build
|
||||
```
|
||||
|
||||
To create a default configuration, nodeKey and private validator files, let's
|
||||
execute `tendermint init`. But before we do that, we will need to install
|
||||
Tendermint Core. Please refer to [the official
|
||||
guide](https://docs.tendermint.com/master/introduction/install.html). If you're
|
||||
installing from source, don't forget to checkout the latest release (`git checkout vX.Y.Z`).
|
||||
installing from source, don't forget to checkout the latest release (`git
|
||||
checkout vX.Y.Z`). Don't forget to check that the application uses the same
|
||||
major version.
|
||||
|
||||
```bash
|
||||
rm -rf /tmp/example
|
||||
|
||||
Reference in New Issue
Block a user