assertion fix
This commit is contained in:
@@ -9,6 +9,7 @@ from .. import db, DELETE
|
||||
from ..base.chain import current_chain
|
||||
from ..blocks import get_block
|
||||
from ..database.model import SeriesSet, SeriesDict
|
||||
from ..util import hexstr
|
||||
from ..util.shutdown import fatal
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -81,7 +82,7 @@ class DbState(SeriesCollection):
|
||||
root_block = await get_block(height)
|
||||
if root_block is None:
|
||||
fatal(f'Could not get root block {height} {hash} from RPC')
|
||||
assert root_block.hash == hash
|
||||
assert hexstr(root_block.hash) == hash
|
||||
assert root_block.height == height
|
||||
state = BlockState()
|
||||
root_fork = state.init_root_block(root_block)
|
||||
|
||||
Reference in New Issue
Block a user