Handy new class PrintError
Saves adding "def print_error" to endless classes.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user