From d2a8ae3d2a4f4a1c40642ea40e67e09128ce3f2e Mon Sep 17 00:00:00 2001 From: nonergodic Date: Fri, 15 Nov 2024 15:06:02 -0800 Subject: [PATCH] add erroneously excluded check back in --- .../WormholeRelayer/MockOffchainRelayer.sol | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/testing/WormholeRelayer/MockOffchainRelayer.sol b/src/testing/WormholeRelayer/MockOffchainRelayer.sol index 68abfc7..145c01e 100644 --- a/src/testing/WormholeRelayer/MockOffchainRelayer.sol +++ b/src/testing/WormholeRelayer/MockOffchainRelayer.sol @@ -134,19 +134,22 @@ contract MockOffchainRelayer { } for (uint16 i = 0; i < vaas.length; ++i) { + uint16 chain = vaas[i].emitterChainId; + address emitter = vaas[i].emitterAddress.fromUniversalAddress(); if (debugLogging) - console.log( - "Found VAA from chain %s emitted from %s", - vaas[i].emitterChainId, - vaas[i].emitterAddress.fromUniversalAddress() + console.log("Found VAA from chain %s emitted from %s", chain, emitter); + + if (emitter == address(wormholeRelayerContracts[chain])) { + if (debugLogging) + console.log("Relaying VAA to chain %s", chain); + + genericRelay( + vaas[i], + vaas, + cctpSignedMsgs, + deliveryOverrides ); - - genericRelay( - vaas[i], - vaas, - cctpSignedMsgs, - deliveryOverrides - ); + } } }