difftreelog
tests(util): fix t isDevNoderying to access discarded blocks
in: master
1 file changed
tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth260 };260 };261261262 isDevNode = async () => {262 isDevNode = async () => {263 let blockNumber = (await this.helper.callRpc('api.query.system.number')).toJSON();264 if (blockNumber == 0) {265 await this.helper.wait.newBlocks(1); 266 blockNumber = (await this.helper.callRpc('api.query.system.number')).toJSON();267 }263 const block1 = await this.helper.callRpc('api.rpc.chain.getBlock', [await this.helper.callRpc('api.rpc.chain.getBlockHash', [1])]);268 const block2 = await this.helper.callRpc('api.rpc.chain.getBlock', [await this.helper.callRpc('api.rpc.chain.getBlockHash', [blockNumber])]);264 const block2 = await this.helper.callRpc('api.rpc.chain.getBlock', [await this.helper.callRpc('api.rpc.chain.getBlockHash', [2])]);269 const block1 = await this.helper.callRpc('api.rpc.chain.getBlock', [await this.helper.callRpc('api.rpc.chain.getBlockHash', [blockNumber - 1])]);265 const findCreationDate = async (block: any) => {270 const findCreationDate = async (block: any) => {266 const humanBlock = block.toHuman();271 const humanBlock = block.toHuman();267 let date;272 let date;