[node] fix: stop validator (#401)

This commit is contained in:
markspanbroek 2023-05-01 16:23:26 +02:00 committed by GitHub
parent 5ce655db47
commit 515304f9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -421,5 +421,8 @@ proc stop*(node: CodexNodeRef) {.async.} =
if hostContracts =? node.contracts.host:
await hostContracts.stop()
if validatorContracts =? node.contracts.validator:
await validatorContracts.stop()
if not node.blockStore.isNil:
await node.blockStore.close