@@ -326,10 +326,10 @@ describe('postgres datastore', () => {
326
326
} ) ;
327
327
328
328
test ( 'pg address STX balances' , async ( ) => {
329
- const dbBlock : DbBlock = {
329
+ const block = new TestBlockBuilder ( {
330
330
block_hash : '0x9876' ,
331
331
index_block_hash : '0x5432' ,
332
- block_height : 68456 ,
332
+ block_height : 1 ,
333
333
parent_index_block_hash : '0x00' ,
334
334
parent_block_hash : '0xff0011' ,
335
335
parent_microblock_hash : '0x00' ,
@@ -339,13 +339,8 @@ describe('postgres datastore', () => {
339
339
miner_txid : '0x4321' ,
340
340
canonical : true ,
341
341
parent_microblock_sequence : 0 ,
342
- execution_cost_read_count : 0 ,
343
- execution_cost_read_length : 0 ,
344
- execution_cost_runtime : 0 ,
345
- execution_cost_write_count : 0 ,
346
- execution_cost_write_length : 0 ,
347
- } ;
348
- await db . updateBlock ( client , dbBlock ) ;
342
+ } ) . build ( ) ;
343
+ await db . update ( block ) ;
349
344
350
345
const createMinerReward = (
351
346
recipient : string ,
@@ -359,7 +354,7 @@ describe('postgres datastore', () => {
359
354
block_hash : '0x9876' ,
360
355
index_block_hash : '0x5432' ,
361
356
from_index_block_hash : '0x6789' ,
362
- mature_block_height : 68456 ,
357
+ mature_block_height : 1 ,
363
358
canonical : canonical ,
364
359
recipient : recipient ,
365
360
coinbase_amount : amount ,
@@ -388,7 +383,7 @@ describe('postgres datastore', () => {
388
383
raw_tx : '0x' ,
389
384
index_block_hash : '0x5432' ,
390
385
block_hash : '0x9876' ,
391
- block_height : 68456 ,
386
+ block_height : 1 ,
392
387
burn_block_time : 2837565 ,
393
388
parent_burn_block_time : 1626122935 ,
394
389
type_id : DbTxTypeId . Coinbase ,
@@ -494,8 +489,8 @@ describe('postgres datastore', () => {
494
489
totalFeesSent : 1334n ,
495
490
totalMinerRewardsReceived : 100010n ,
496
491
burnchainLockHeight : 123 ,
497
- burnchainUnlockHeight : 68656 ,
498
- lockHeight : 68456 ,
492
+ burnchainUnlockHeight : 201 ,
493
+ lockHeight : 1 ,
499
494
lockTxId : '0x1234' ,
500
495
locked : 400n ,
501
496
} ) ;
0 commit comments