blockchain: store reference to parent_id instead of parent, so that it gets updated after swap
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user