X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=transports%2Fnative.py;h=2ed7ff92db091ff537b2b2b68e8aff343ff8a04e;hp=6eddf4bdc491fd4d1e70ae4306aa307b2dfef903;hb=9ffe305089150cc8b236c801d6b5c15d4f98e764;hpb=638b04908c8a25b8e40511eb5b5b6c0fce99b99a diff --git a/transports/native.py b/transports/native.py index 6eddf4b..2ed7ff9 100644 --- a/transports/native.py +++ b/transports/native.py @@ -10,6 +10,15 @@ def timestr(): return time.strftime("[%d/%m/%Y-%H:%M:%S]") +def new_to_old(s): + s = s.replace("'block_hash'", "'blk_hash'") + s = s.replace("'index'", "'pos'") + s = s.replace("'timestamp'", "'nTime'") + s = s.replace("'is_input'", "'is_in'") + s = s.replace("'raw_output_script'","'raw_scriptPubKey'") + return s + + class NativeServer(threading.Thread): def __init__(self, shared, abe, irc, banner, host, port): @@ -156,6 +165,7 @@ class NativeServer(threading.Thread): elif cmd == 'h': address = data out = repr( self.store.get_history( address ) ) + out = new_to_old(out) elif cmd =='tx': out = self.store.send_tx(data)