Commit 08bcdd21 authored by Karl Floersch's avatar Karl Floersch

Fix tests

parent d3d6790b
...@@ -168,28 +168,14 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -168,28 +168,14 @@ describe('OVM_CanonicalTransactionChain', () => {
}) })
describe('with valid input parameters', () => { describe('with valid input parameters', () => {
it('should emit a QueueTransactionAppended event', async () => { it('should emit a TransactionEnqueued event', async () => {
const timestamp = (await getEthTime(ethers.provider)) + 100 const timestamp = (await getEthTime(ethers.provider)) + 100
const blockNumber = await getNextBlockNumber(ethers.provider)
await setEthTime(ethers.provider, timestamp) await setEthTime(ethers.provider, timestamp)
const encodedTimestampAndBlockNumber = encodeTimestampAndBlockNumber(
timestamp,
blockNumber
)
const encodedQueueTransaction = encodeQueueTransaction(
await signer.getAddress(),
target,
gasLimit,
data
)
await expect( await expect(
OVM_CanonicalTransactionChain.enqueue(target, gasLimit, data) OVM_CanonicalTransactionChain.enqueue(target, gasLimit, data)
) )
.to.emit(OVM_CanonicalTransactionChain, 'QueueTransactionAppended') .to.emit(OVM_CanonicalTransactionChain, 'TransactionEnqueued')
.withArgs(encodedQueueTransaction, encodedTimestampAndBlockNumber)
}) })
describe('when enqueing multiple times', () => { describe('when enqueing multiple times', () => {
...@@ -399,7 +385,7 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -399,7 +385,7 @@ describe('OVM_CanonicalTransactionChain', () => {
sequencer sequencer
).appendQueueBatch(1) ).appendQueueBatch(1)
) )
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'QueueBatchAppended')
.withArgs(0, 1) .withArgs(0, 1)
}) })
}) })
...@@ -414,13 +400,13 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -414,13 +400,13 @@ describe('OVM_CanonicalTransactionChain', () => {
it('should be able to append a single element', async () => { it('should be able to append a single element', async () => {
await expect(OVM_CanonicalTransactionChain.appendQueueBatch(1)) await expect(OVM_CanonicalTransactionChain.appendQueueBatch(1))
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'QueueBatchAppended')
.withArgs(0, 1) .withArgs(0, 1)
}) })
it(`should be able to append ${size} elements`, async () => { it(`should be able to append ${size} elements`, async () => {
await expect(OVM_CanonicalTransactionChain.appendQueueBatch(size)) await expect(OVM_CanonicalTransactionChain.appendQueueBatch(size))
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'QueueBatchAppended')
.withArgs(0, size) .withArgs(0, size)
}) })
...@@ -611,7 +597,7 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -611,7 +597,7 @@ describe('OVM_CanonicalTransactionChain', () => {
size size
) )
) )
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'SequencerBatchAppended')
.withArgs(0, 0) .withArgs(0, 0)
}) })
}) })
...@@ -659,7 +645,7 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -659,7 +645,7 @@ describe('OVM_CanonicalTransactionChain', () => {
size * 2 size * 2
) )
) )
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'SequencerBatchAppended')
.withArgs(0, size) .withArgs(0, size)
}) })
}) })
...@@ -699,7 +685,7 @@ describe('OVM_CanonicalTransactionChain', () => { ...@@ -699,7 +685,7 @@ describe('OVM_CanonicalTransactionChain', () => {
size + spacing size + spacing
) )
) )
.to.emit(OVM_CanonicalTransactionChain, 'ChainBatchAppended') .to.emit(OVM_CanonicalTransactionChain, 'SequencerBatchAppended')
.withArgs(0, spacing) .withArgs(0, spacing)
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment