|
@ -317,6 +317,8 @@ class Blockchain(util.PrintError): |
|
|
return bitsN << 24 | bitsBase |
|
|
return bitsN << 24 | bitsBase |
|
|
|
|
|
|
|
|
def can_connect(self, header, check_height=True): |
|
|
def can_connect(self, header, check_height=True): |
|
|
|
|
|
if header is None: |
|
|
|
|
|
return False |
|
|
height = header['block_height'] |
|
|
height = header['block_height'] |
|
|
if check_height and self.height() != height - 1: |
|
|
if check_height and self.height() != height - 1: |
|
|
#self.print_error("cannot connect at height", height) |
|
|
#self.print_error("cannot connect at height", height) |
|
|