mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-18 07:31:20 +00:00
TMSP -> ABCI
This commit is contained in:
@ -13,7 +13,7 @@ message_types = {
|
||||
0x25: "rm_listener",
|
||||
}
|
||||
|
||||
# return the decoded arguments of tmsp messages
|
||||
# return the decoded arguments of abci messages
|
||||
|
||||
class RequestDecoder():
|
||||
|
@ -26,9 +26,9 @@ class Connection():
|
||||
raise IOError("dead connection")
|
||||
this.recBuf.write(data)
|
||||
|
||||
# TMSP server responds to messges by calling methods on the app
|
||||
# ABCI server responds to messges by calling methods on the app
|
||||
|
||||
class TMSPServer():
|
||||
class ABCIServer():
|
||||
|
||||
def __init__(self, app, port=5410):
|
||||
self.app = app
|
@ -1,8 +1,8 @@
|
||||
import sys
|
||||
|
||||
from tmsp.wire import hex2bytes, decode_big_endian, encode_big_endian
|
||||
from tmsp.server import TMSPServer
|
||||
from tmsp.reader import BytesBuffer
|
||||
from abci.wire import hex2bytes, decode_big_endian, encode_big_endian
|
||||
from abci.server import ABCIServer
|
||||
from abci.reader import BytesBuffer
|
||||
|
||||
|
||||
class CounterApplication():
|
||||
@ -75,8 +75,8 @@ if __name__ == '__main__':
|
||||
print "too many arguments"
|
||||
quit()
|
||||
|
||||
print 'TMSP Demo APP (Python)'
|
||||
print 'ABCI Demo APP (Python)'
|
||||
|
||||
app = CounterApplication()
|
||||
server = TMSPServer(app, port)
|
||||
server = ABCIServer(app, port)
|
||||
server.main_loop()
|
||||
|
Reference in New Issue
Block a user