wormhole/node/pkg
Chirantan Ekbote cbce1e7c1f node: processor: Fix incorrect fallthrough in `handleCleanup`
When processing pending observations, the `handleCleanup` function
checks if we already have a stored quorum VAA and deletes the in-memory
observation if one is found.  If a stored quorum VAA is not found, then
we're supposed to continue evaluating the other conditions and take
the appropriate action.  This was implemented using a `fallthrough`
statement.

Unfortunately, this is not how `fallthrough` works.  `fallthrough`
simply tells the compiler to execute the body of the next branch in
the switch block, *without evaluating the condition*.  It also doesn't
evaluate the conditions for any of the other branches in the switch.

In practice what this meant is that for local observations that didn't
have quorum we would always take the first branch, fall through to the
second branch, and then exit the switch.  Only once we had a quorum
(`s.submitted == true`) would we actually consider any of the other
branches in the switch.  It also meant that there was no case where we
would take the branch for re-observing messages that hadn't reached
quorum.

Fix this by moving the stored quorum VAA check into an if statement and
then falling through to the switch statement if one is not found.
2022-09-16 18:17:45 -04:00
..
algorand Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
celo Guardian eth nil event check (#1300) 2022-06-23 09:40:04 -05:00
common Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
db Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
devnet Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
ethereum node: Fixed potential latest block nil dereference 2022-09-16 14:08:31 -04:00
governor Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
near Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
notify/discord Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
p2p Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
processor node: processor: Fix incorrect fallthrough in `handleCleanup` 2022-09-16 18:17:45 -04:00
publicrpc Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
readiness Add Go linting stage to CI 2021-08-31 08:58:17 +00:00
reporter Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
solana Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
supervisor node/pkg/supervisor: document upstream repository 2022-06-21 22:32:45 -04:00
telemetry Better lint and formatting (#1263) 2022-06-21 12:18:16 -07:00
terra Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
version node: rename bridge/ to node/ 2021-08-26 11:36:36 +02:00
.gitignore node: rename bridge/ to node/ 2021-08-26 11:36:36 +02:00