Skip to content

Commit 9d32968

Browse files
committed
Add in default for MerkleWitness
1 parent 4716476 commit 9d32968

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/protocol/src/model/StateTransitionProvableBatch.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class StateTransitionProvableBatch extends Struct({
7575
): StateTransitionProvableBatch {
7676
const batch = transitions.map((entry) => entry.transition);
7777
const transitionTypes = transitions.map((entry) => entry.type);
78-
78+
const witnesses = merkleWitnesses.slice();
7979
// Check that order is correct
8080
let normalSTsStarted = false;
8181
transitionTypes.forEach((x) => {
@@ -90,11 +90,12 @@ export class StateTransitionProvableBatch extends Struct({
9090
while (batch.length < constants.stateTransitionProverBatchSize) {
9191
batch.push(ProvableStateTransition.dummy());
9292
transitionTypes.push(ProvableStateTransitionType.normal);
93+
witnesses.push(new RollupMerkleTreeWitness({ path: [], isLeft: [] }));
9394
}
9495
return new StateTransitionProvableBatch({
9596
batch,
9697
transitionTypes,
97-
merkleWitnesses,
98+
merkleWitnesses: witnesses,
9899
});
99100
}
100101

0 commit comments

Comments
 (0)