diff --git a/app/app.go b/app/app.go index 3bb1009e6..693acb905 100644 --- a/app/app.go +++ b/app/app.go @@ -111,9 +111,9 @@ func (app *Blackstar) Query(query []byte) (code tmsp.CodeType, result []byte, lo return tmsp.CodeType_OK, value, "Success" } -// TMSP::GetHash -func (app *Blackstar) GetHash() (hash []byte, log string) { - hash, log, err := app.eyesCli.GetHashSync() +// TMSP::Commit +func (app *Blackstar) Commit() (hash []byte, log string) { + hash, log, err := app.eyesCli.CommitSync() if err != nil { panic("Error getting hash: " + err.Error()) } diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index c90827702..dd3397de1 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "time" "github.com/gorilla/websocket" "github.com/tendermint/blackstar/tests" @@ -14,12 +15,13 @@ import ( ) func main() { - ws := rpcclient.NewWSClient("ws://127.0.0.1:46657/websocket") - // ws := rpcclient.NewWSClient("ws://104.236.69.128:46657/websocket") + //ws := rpcclient.NewWSClient("ws://127.0.0.1:46657/websocket") + ws := rpcclient.NewWSClient("ws://104.131.151.26:46657/websocket") _, err := ws.Start() if err != nil { Exit(err.Error()) } + var counter = 0 // Read a bunch of responses go func() { @@ -28,7 +30,7 @@ func main() { if !ok { break } - fmt.Println("res:", Blue(string(res))) + fmt.Println(counter, "res:", Blue(string(res))) } }() @@ -78,6 +80,9 @@ func main() { // Now send coins between these accounts for { + counter += 1 + time.Sleep(time.Millisecond * 10) + randA := RandInt() % len(privAccounts) randB := RandInt() % len(privAccounts) if randA == randB {