Add way to enforce serial order in counter app from command line

This commit is contained in:
Jae Kwon
2015-12-08 21:01:33 -08:00
parent 36e89b606e
commit 5c20d1b3e5
3 changed files with 11 additions and 3 deletions

View File

@ -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())
}