1
0

blockchain: store reference to parent_id instead of parent, so that it gets updated after swap

This commit is contained in:
ThomasV
2017-07-20 15:05:47 +02:00
parent c3615d0aa7
commit c522c6b4d0
2 changed files with 20 additions and 16 deletions

View File

@@ -835,9 +835,9 @@ class Network(util.DaemonThread):
if branch is not None:
if branch.check_header(interface.bad_header):
interface.print_error('joining chain', interface.bad)
elif branch.parent.check_header(header):
elif branch.parent().check_header(header):
interface.print_error('reorg', interface.bad, interface.tip)
interface.blockchain = branch.parent
interface.blockchain = branch.parent()
else:
# should not happen
raise BaseException('error')