s/GetHash/Commit/g
This commit is contained in:
parent
f95f253916
commit
0417c71543
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue