1
0

Handy new class PrintError

Saves adding "def print_error" to endless classes.
This commit is contained in:
Neil Booth
2015-09-06 21:40:00 +09:00
parent 735a9e9a29
commit 93b99ebded
5 changed files with 32 additions and 39 deletions

View File

@@ -22,7 +22,7 @@ import util
from bitcoin import *
class Blockchain():
class Blockchain(util.PrintError):
'''Manages blockchain headers and their verification'''
def __init__(self, config, network):
self.config = config
@@ -31,9 +31,6 @@ class Blockchain():
self.local_height = 0
self.set_local_height()
def print_error(self, *msg):
util.print_error("[blockchain]", *msg)
def height(self):
return self.local_height