@@ -122,7 +122,7 @@ contract IpcExchangeTest is Test {
122122 localNonce: 0
123123 });
124124
125- resultMsg = ResultMsg ({outcome: OutcomeType.Ok, id: callEnvelope.toHash (), ret: bytes ("" )});
125+ resultMsg = ResultMsg ({outcome: OutcomeType.Ok, id: callEnvelope.toTracingId (), ret: bytes ("" )});
126126
127127 resultEnvelope = IpcEnvelope ({
128128 kind: IpcMsgKind.Result,
@@ -196,8 +196,8 @@ contract IpcExchangeTest is Test {
196196 vm.deal (address (this ), 1000 );
197197 exch.performIpcCall_ (ipcAddressA, callMsg, 1 );
198198 // assert that we stored the correct callEnvelope in the correlation map.
199- IpcEnvelope memory correlated = exch.getInflight (callEnvelope.toHash ());
200- require (correlated.toHash () == callEnvelope.toHash ());
199+ IpcEnvelope memory correlated = exch.getInflight (callEnvelope.toTracingId ());
200+ require (correlated.toTracingId () == callEnvelope.toTracingId ());
201201
202202 vm.startPrank (gateway);
203203
@@ -213,14 +213,15 @@ contract IpcExchangeTest is Test {
213213 bytes32 [] memory ids = new bytes32 [](3 );
214214 for (uint64 i = 0 ; i < 3 ; i++ ) {
215215 callEnvelope.localNonce = i;
216+ callEnvelope.originalNonce = i;
216217 vm.mockCall (
217218 gateway,
218219 abi.encodeWithSelector (IGateway.sendContractXnetMessage.selector ),
219220 abi.encode (callEnvelope)
220221 );
221222 exch.performIpcCall_ (ipcAddressA, callMsg, 1 );
222223
223- bytes32 id = callEnvelope.toHash ();
224+ bytes32 id = callEnvelope.toTracingId ();
224225 require (exch.getInflight (id).value != 0 , "envelope not found in correlation map " );
225226
226227 ids[i] = id;
@@ -254,8 +255,8 @@ contract IpcExchangeTest is Test {
254255 resultEnvelope.message = abi.encode (resultMsg);
255256
256257 // assert that we stored the correct callEnvelope in the correlation map.
257- IpcEnvelope memory correlated = exch.getInflight (callEnvelope.toHash ());
258- require (correlated.toHash () == callEnvelope.toHash ());
258+ IpcEnvelope memory correlated = exch.getInflight (callEnvelope.toTracingId ());
259+ require (correlated.toTracingId () == callEnvelope.toTracingId ());
259260
260261 // Simulate an OK incoming result.
261262 exch.handleIpcMessage (resultEnvelope);
0 commit comments