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

@ -13,10 +13,11 @@ type CounterApplication struct {
hashCount int
txCount int
commitCount int
serial bool
}
func NewCounterApplication() *CounterApplication {
return &CounterApplication{}
func NewCounterApplication(serial bool) *CounterApplication {
return &CounterApplication{serial: serial}
}
func (app *CounterApplication) Open() types.AppContext {
@ -25,6 +26,7 @@ func (app *CounterApplication) Open() types.AppContext {
hashCount: app.hashCount,
txCount: app.txCount,
commitCount: app.commitCount,
serial: app.serial,
}
}