You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('can return active stake snapshots for an address',async()=>{
38
31
constdbResp=awaitgetTestData('WITH current_epoch AS (SELECT max(epoch_no) AS epoch_no FROM block) select view from epoch_stake join stake_address on epoch_stake.addr_id = stake_address.id where epoch_no=(SELECT epoch_no FROM current_epoch) ORDER BY RANDOM() LIMIT 1;')
constdbResp=awaitgetTestData('SELECT block_no, tx_countFROM block WHERE block_no IS NOT NULL AND tx_count > 10 ORDER BY RANDOM() LIMIT 1;')
87
+
constdbResp=awaitgetTestData('SELECT block_id, block_no, tx_count, fee FROM block JOIN tx t ON block.id = t.block_id WHERE block_no IS NOT NULL AND tx_count>0 GROUP BY block_id, block_no, tx_count, fee HAVING sum(fee)>0 ORDER BY RANDOM() LIMIT 1;')
95
88
logger.info('Block number -',dbResp.rows[0].block_no)
0 commit comments