@@ -301,6 +301,7 @@ mod tests {
301
301
) ;
302
302
wait ( "1" ) ;
303
303
}
304
+ #[ test]
304
305
fn test_block_header ( ) {
305
306
// GET /api/block/:hash/header
306
307
let binding = format ! ( "block/000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce" ) . clone ( ) ;
@@ -311,20 +312,23 @@ mod tests {
311
312
) ;
312
313
wait ( "1" ) ;
313
314
}
315
+ #[ test]
314
316
fn test_block_height ( ) {
315
317
// GET /api/block-height:height
316
318
let binding = format ! ( "block-height/615615" ) . clone ( ) ;
317
319
let block_height: & str = blocking ( & binding) . expect ( "an existing block hash is needed" ) ;
318
320
let block_height = generic_sys_call ( "block_height" , "615615" ) ;
319
321
wait ( "1" ) ;
320
322
}
323
+ #[ test]
321
324
fn test_blocks_timestamp ( ) {
322
325
// GET /api/v1/mining/blocks/timestamp/:timestamp
323
326
let binding = format ! ( "v1/mining/blocks/timestamp/1672531200" ) . clone ( ) ;
324
327
let timestamp: & str = blocking ( & binding) . expect ( "an existing block hash is needed" ) ;
325
328
let timestamp = generic_sys_call ( "blocks_timestamp" , "1672531200" ) ;
326
329
wait ( "1" ) ;
327
330
}
331
+ #[ test]
328
332
fn test_block_raw ( ) {
329
333
// GET /api/block/:hash/raw
330
334
let binding = format ! ( "block/0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2" ) . clone ( ) ;
@@ -333,9 +337,10 @@ mod tests {
333
337
"block_raw" ,
334
338
"0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2" ,
335
339
) ;
336
- wait ( "100 " ) ;
340
+ wait ( "1 " ) ;
337
341
}
338
342
343
+ #[ test]
339
344
fn test_block_status ( ) {
340
345
// GET /api/block/:hash/status
341
346
let binding = format ! ( "block/0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2" ) . clone ( ) ;
@@ -344,14 +349,15 @@ mod tests {
344
349
"block_status" ,
345
350
"0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2" ,
346
351
) ;
347
- wait ( "100 " ) ;
352
+ wait ( "1 " ) ;
348
353
}
354
+ #[ test]
349
355
fn test_blocks_tip_height ( ) {
350
356
// GET /api/blocks/tip/height
351
- let binding = format ! ( "blocks_tip_height " ) . clone ( ) ;
357
+ let binding = format ! ( "blocks/tip/height " ) . clone ( ) ;
352
358
let block_raw: & str = blocking ( & binding) . expect ( "returns current block_height" ) ;
353
359
let block_raw = generic_sys_call ( "blocks_tip_height" , "extraneous_arg" ) ;
354
- wait ( "100 " ) ;
360
+ wait ( "1 " ) ;
355
361
}
356
362
#[ test]
357
363
fn test_blockheight ( ) {
@@ -380,7 +386,6 @@ mod tests {
380
386
// assert_ne!(bad_add(1, 2), 3);
381
387
wait ( "1" ) ;
382
388
}
383
-
384
389
use std:: panic:: { catch_unwind, AssertUnwindSafe } ;
385
390
#[ test]
386
391
fn should_panic ( ) {
0 commit comments