-
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prover): allow payload provider to work with no finalized block (#…
…5820) * Fix some issues in the prover * Remove unused file * Fix browser tests * Add comment for buffer
- Loading branch information
1 parent
4468054
commit 549aa03
Showing
6 changed files
with
486 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/prover/test/unit/proof_provider/orderd_map.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {expect} from "chai"; | ||
import {OrderedMap} from "../../../src/proof_provider/ordered_map.js"; | ||
|
||
describe("proof_provider/ordered_map", () => { | ||
it("should initialize the min with undefined", () => { | ||
const omap = new OrderedMap<string>(); | ||
|
||
expect(omap.min).to.undefined; | ||
}); | ||
|
||
it("should initialize the max with undefined", () => { | ||
const omap = new OrderedMap<string>(); | ||
|
||
expect(omap.max).to.undefined; | ||
}); | ||
|
||
it("should set the min and max to the first value ", () => { | ||
const omap = new OrderedMap<string>(); | ||
omap.set(11, "value"); | ||
|
||
expect(omap.min).eql(11); | ||
expect(omap.max).eql(11); | ||
}); | ||
|
||
it("should set the max value", () => { | ||
const omap = new OrderedMap<string>(); | ||
omap.set(10, "value"); | ||
omap.set(11, "value"); | ||
|
||
expect(omap.max).eql(11); | ||
}); | ||
|
||
it("should set the min value", () => { | ||
const omap = new OrderedMap<string>(); | ||
omap.set(10, "value"); | ||
omap.set(11, "value"); | ||
|
||
expect(omap.min).eql(10); | ||
}); | ||
}); |
Oops, something went wrong.