fix reference to verifier
authorThomasV <thomasv@gitorious>
Tue, 11 Mar 2014 08:38:08 +0000 (09:38 +0100)
committerThomasV <thomasv@gitorious>
Tue, 11 Mar 2014 08:38:08 +0000 (09:38 +0100)
lib/network.py
lib/wallet.py

index 3262810..87b90cc 100644 (file)
@@ -406,7 +406,7 @@ class Network(threading.Thread):
         return self.blockchain.read_header(tx_height)
 
     def get_local_height(self):
-        return self.blockchain.local_height
+        return self.blockchain.height()
 
 
 
index 894f0a5..e0ed77b 100644 (file)
@@ -844,7 +844,7 @@ class NewWallet:
             if tx_height == 0:
                 tx_age = 0
             else: 
-                tx_age = self.verifier.blockchain.height() - tx_height + 1
+                tx_age = self.network.get_local_height() - tx_height + 1
             if tx_age > age:
                 age = tx_age
         return age > 2
@@ -1101,7 +1101,7 @@ class NewWallet:
         inputs = []
 
         for item in coins:
-            if item.get('coinbase') and item.get('height') + COINBASE_MATURITY > self.network.blockchain.height():
+            if item.get('coinbase') and item.get('height') + COINBASE_MATURITY > self.network.get_local_height():
                 continue
             addr = item.get('address')
             v = item.get('value')