mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 17:01:35 +00:00
Add way to enforce serial order in counter app from command line
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/tmsp/example"
|
||||
"github.com/tendermint/tmsp/server"
|
||||
@ -8,8 +10,12 @@ import (
|
||||
|
||||
func main() {
|
||||
|
||||
serialPtr := flag.Bool("serial", false, "Enforce incrementing (serial) txs")
|
||||
flag.Parse()
|
||||
app := example.NewCounterApplication(*serialPtr)
|
||||
|
||||
// Start the listener
|
||||
_, err := server.StartListener("tcp://0.0.0.0:46658", example.NewCounterApplication())
|
||||
_, err := server.StartListener("tcp://0.0.0.0:46658", app)
|
||||
if err != nil {
|
||||
Exit(err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user