File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ describe("Draw Benchmark", async () => {
137
137
const tx = await arbitrable [ "createDispute(string)" ] ( "future of france" , {
138
138
value : arbitrationCost ,
139
139
} ) ;
140
+ await tx . wait ( ) ;
140
141
if ( tx . blockNumber === null ) throw new Error ( "tx.blockNumber is null" ) ;
141
142
const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
142
143
const [ disputeId ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ describe("Integration tests", async () => {
129
129
) ;
130
130
console . log ( "dispute hash: " , disputeHash ) ;
131
131
if ( lastBlock . hash === null ) {
132
- process . exit ( ) ;
132
+ throw new Error ( "Block hash is null - cannot calculate dispute hash" ) ;
133
133
}
134
134
// Relayer tx
135
135
const tx2 = await homeGateway
Original file line number Diff line number Diff line change @@ -33,16 +33,16 @@ describe("BlockHashRNG", async () => {
33
33
} ) ;
34
34
35
35
it ( "Should return a non-zero number for a block number in the past" , async ( ) => {
36
- const tx = await rng . receiveRandomness ( 9876543210 ) ;
36
+ const tx = await rng . receiveRandomness ( 5 ) ;
37
37
const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
38
38
const [ rn ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
39
- expect ( rn ) . to . equal ( 0 ) ;
39
+ expect ( rn ) . to . not . equal ( 0 ) ;
40
40
} ) ;
41
41
42
42
it ( "Should return zero for a block number in the future" , async ( ) => {
43
- const tx = await rng . receiveRandomness ( 5 ) ;
43
+ const tx = await rng . receiveRandomness ( 9876543210 ) ;
44
44
const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
45
45
const [ rn ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
46
- expect ( rn ) . to . not . equal ( 0 ) ;
46
+ expect ( rn ) . to . equal ( 0 ) ;
47
47
} ) ;
48
48
} ) ;
You can’t perform that action at this time.
0 commit comments