removed checkorder, submit order Bitcoin p2p messages and FixedStrType
authorForrest Voight <forrest@forre.st>
Tue, 17 Jan 2012 22:07:07 +0000 (17:07 -0500)
committerForrest Voight <forrest@forre.st>
Tue, 17 Jan 2012 22:07:07 +0000 (17:07 -0500)
p2pool/bitcoin/data.py
p2pool/bitcoin/p2p.py

index 90deba6..06e940e 100644 (file)
@@ -165,18 +165,6 @@ class VarStrType(Type):
     def write(self, file, item):
         return self._inner_size.write(file, len(item)), item
 
-class FixedStrType(Type):
-    def __init__(self, length):
-        self.length = length
-    
-    def read(self, file):
-        return read(file, self.length)
-    
-    def write(self, file, item):
-        if len(item) != self.length:
-            raise ValueError('incorrect length item!')
-        return file, item
-
 class PassthruType(Type):
     def read(self, file):
         return read(file, size(file))
index 98ec95b..03430a7 100644 (file)
@@ -201,14 +201,6 @@ class Protocol(BaseProtocol):
         ('last', bitcoin_data.PossiblyNoneType(0, bitcoin_data.HashType())),
     ])
     message_getaddr = bitcoin_data.ComposedType([])
-    message_checkorder = bitcoin_data.ComposedType([
-        ('id', bitcoin_data.HashType()),
-        ('order', bitcoin_data.FixedStrType(60)), # XXX
-    ])
-    message_submitorder = bitcoin_data.ComposedType([
-        ('id', bitcoin_data.HashType()),
-        ('order', bitcoin_data.FixedStrType(60)), # XXX
-    ])
     
     message_addr = bitcoin_data.ComposedType([
         ('addrs', bitcoin_data.ListType(bitcoin_data.ComposedType([