diff --git a/docs/guides/go-built-in.md b/docs/guides/go-built-in.md index 705022c9..96adaf88 100644 --- a/docs/guides/go-built-in.md +++ b/docs/guides/go-built-in.md @@ -448,6 +448,12 @@ defer db.Close() app := NewKVStoreApplication(db) ``` +For **Windows** users, restarting this app will make badger throw an error as it requires value log to be truncated. For more information on this, visit [here](https://github.com/dgraph-io/badger/issues/744). +This can be avoided by setting the truncate option to true, like this: +```go +db, err := badger.Open(badger.DefaultOptions("/tmp/badger").WithTruncate(true)) +``` + Then we use it to create a Tendermint Core `Node` instance: ```go diff --git a/docs/guides/go.md b/docs/guides/go.md index ada84adf..3798c9f5 100644 --- a/docs/guides/go.md +++ b/docs/guides/go.md @@ -388,6 +388,12 @@ defer db.Close() app := NewKVStoreApplication(db) ``` +For **Windows** users, restarting this app will make badger throw an error as it requires value log to be truncated. For more information on this, visit [here](https://github.com/dgraph-io/badger/issues/744). +This can be avoided by setting the truncate option to true, like this: +```go +db, err := badger.Open(badger.DefaultOptions("/tmp/badger").WithTruncate(true)) +``` + Then we start the ABCI server and add some signal handling to gracefully stop it upon receiving SIGTERM or Ctrl-C. Tendermint Core will act as a client, which connects to our server and send us transactions and other messages.