mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-10 22:10:11 +00:00
Added counter test written in Golang
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package example
|
||||
package counter
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
@@ -1,4 +1,4 @@
|
||||
package example
|
||||
package dummy
|
||||
|
||||
import (
|
||||
"strings"
|
||||
@@ -1,4 +1,4 @@
|
||||
package example
|
||||
package dummy
|
||||
|
||||
import (
|
||||
"testing"
|
||||
@@ -47,7 +47,7 @@ class CounterApplication():
|
||||
return 6
|
||||
return 0
|
||||
|
||||
def get_hash(self):
|
||||
def commit(self):
|
||||
self.hashCount += 1
|
||||
if self.txCount == 0:
|
||||
return "", 0
|
||||
|
||||
@@ -8,7 +8,7 @@ message_types = {
|
||||
0x04: "set_option",
|
||||
0x21: "append_tx",
|
||||
0x22: "check_tx",
|
||||
0x23: "get_hash",
|
||||
0x23: "commit",
|
||||
0x24: "add_listener",
|
||||
0x25: "rm_listener",
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class RequestDecoder():
|
||||
def check_tx(self):
|
||||
return decode_string(self.reader)
|
||||
|
||||
def get_hash(self):
|
||||
def commit(self):
|
||||
return
|
||||
|
||||
def add_listener(self):
|
||||
|
||||
@@ -47,7 +47,7 @@ class CounterApplication():
|
||||
return 6
|
||||
return 0
|
||||
|
||||
def get_hash(self):
|
||||
def commit(self):
|
||||
self.hashCount += 1
|
||||
if self.txCount == 0:
|
||||
return "", 0
|
||||
|
||||
@@ -8,7 +8,7 @@ message_types = {
|
||||
0x04: "set_option",
|
||||
0x21: "append_tx",
|
||||
0x22: "check_tx",
|
||||
0x23: "get_hash",
|
||||
0x23: "commit",
|
||||
0x24: "add_listener",
|
||||
0x25: "rm_listener",
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class RequestDecoder():
|
||||
def check_tx(self):
|
||||
return decode_string(self.reader)
|
||||
|
||||
def get_hash(self):
|
||||
def commit(self):
|
||||
return
|
||||
|
||||
def add_listener(self):
|
||||
|
||||
Reference in New Issue
Block a user