Skip to content

Commit

Permalink
fix(avm): fix SendL2ToL1Message implementation (AztecProtocol#4367)
Browse files Browse the repository at this point in the history
fix(avm): fix SendL2ToL1Message implementation

Relates to AztecProtocol#4002.
  • Loading branch information
fcarreiro committed Feb 1, 2024
1 parent f31c181 commit ee560c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Accrued Substate', () => {

const journalState = journal.flush();
const expected = values.map(v => v.toFr());
expect(journalState.newLogs).toEqual([expected]);
expect(journalState.newL1Messages).toEqual([expected]);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EmitUnencryptedLog extends Instruction {
}

export class SendL2ToL1Message extends Instruction {
static type: string = 'EMITUNENCRYPTEDLOG';
static type: string = 'SENDL2TOL1MSG';
static readonly opcode: Opcode = Opcode.SENDL2TOL1MSG;
// Informs (de)serialization. See Instruction.deserialize.
static readonly wireFormat = [OperandType.UINT8, OperandType.UINT8, OperandType.UINT32, OperandType.UINT32];
Expand All @@ -86,7 +86,7 @@ export class SendL2ToL1Message extends Instruction {
}

const msg = machineState.memory.getSlice(this.msgOffset, this.msgSize).map(f => f.toFr());
journal.writeLog(msg);
journal.writeL1Message(msg);

this.incrementPc(machineState);
}
Expand Down

0 comments on commit ee560c3

Please sign in to comment.