From c9ba81f476c8a16b245723b415b066bad5656111 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Fri, 11 Jan 2013 17:21:55 -0500 Subject: [PATCH] make version 0.1.* properly handle future version 2 addresses --- addresses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addresses.py b/addresses.py index c9464a9e..6e34eeae 100644 --- a/addresses.py +++ b/addresses.py @@ -162,7 +162,7 @@ def decodeAddress(address): #print 'addressVersionNumber', addressVersionNumber #print 'bytesUsedByVersionNumber', bytesUsedByVersionNumber - if addressVersionNumber < 1: + if addressVersionNumber != 1: print 'cannot decode version address version numbers this high' status = 'versiontoohigh' return status,0,0,0 @@ -252,7 +252,7 @@ if __name__ == "__main__": #print 'lengh of a at beginning = ', len(a) print 'This is the data to be encoded in the address: ', a.encode('hex') - returnedAddress = encodeAddress(5,8,ripe.digest()) + returnedAddress = encodeAddress(1,8,ripe.digest()) status,addressVersionNumber,streamNumber,data = decodeAddress(returnedAddress) print returnedAddress print 'Status:', status