Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 18, 2024
1 parent 7bde758 commit a57663a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions yarn-project/circuit-types/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { inspect } from 'util';

export class Body {
constructor(
public txEffects: TxEffect[],
) {}
constructor(public txEffects: TxEffect[]) {}

/**
* Serializes a block body
Expand All @@ -25,13 +23,10 @@ export class Body {
static fromBuffer(buf: Buffer | BufferReader) {
const reader = BufferReader.asReader(buf);

return new this(
reader.readVector(TxEffect),
);
return new this(reader.readVector(TxEffect));
}

[inspect.custom]() {
// print non empty l2ToL1Messages and txEffects
return `Body {
txEffects: ${inspect(this.txEffects)},
}`;
Expand Down Expand Up @@ -93,7 +88,6 @@ export class Body {
numPublicCallsPerTx = 3,
numEncryptedLogsPerCall = 2,
numUnencryptedLogsPerCall = 1,
numL1ToL2MessagesPerCall = 2,
) {
const txEffects = [...new Array(txsPerBlock)].map(_ =>
TxEffect.random(numPrivateCallsPerTx, numPublicCallsPerTx, numEncryptedLogsPerCall, numUnencryptedLogsPerCall),
Expand Down
2 changes: 0 additions & 2 deletions yarn-project/circuit-types/src/l2_block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,13 @@ export class L2Block {
numPublicCallsPerTx = 3,
numEncryptedLogsPerCall = 2,
numUnencryptedLogsPerCall = 1,
numL1ToL2MessagesPerCall = 2,
): L2Block {
const body = Body.random(
txsPerBlock,
numPrivateCallsPerTx,
numPublicCallsPerTx,
numEncryptedLogsPerCall,
numUnencryptedLogsPerCall,
numL1ToL2MessagesPerCall,
);

const txsEffectsHash = body.getTxsEffectsHash();
Expand Down

0 comments on commit a57663a

Please sign in to comment.