Skip to content

Commit

Permalink
feat(sync-v2): verify standby node list when received
Browse files Browse the repository at this point in the history
  • Loading branch information
muni-corn committed Apr 23, 2024
1 parent ffc228f commit 73ac7dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sync-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ function syncStandbyNodeList(
return robustQueryForStandbyNodeListHash(activeNodes).andThen(({ value, winningNodes }) =>
// get full standby list from one of the winning nodes
getStandbyNodeListFromNode(winningNodes[0], value.standbyNodeListHash).andThen((standbyList) =>
okAsync([standbyList, value.standbyNodeListHash] as [P2PTypes.JoinTypes.JoinRequest[], hexstring])
verifyStandbyList(standbyList, value.standbyNodeListHash).map(
() => [standbyList, value.standbyNodeListHash] as [P2PTypes.JoinTypes.JoinRequest[], hexstring]
)
)
)
}
Expand Down

0 comments on commit 73ac7dd

Please sign in to comment.