2
2
// SPDX-License-Identifier: GPL-3.0
3
3
4
4
import { EventEmitter2 } from '@nestjs/event-emitter' ;
5
- import { BlockHeightMap , NodeConfig } from '@subql/node-core' ;
5
+ import { BlockHeightMap , IBlock , NodeConfig } from '@subql/node-core' ;
6
6
import {
7
7
SolanaDatasourceKind ,
8
8
SolanaHandlerKind ,
@@ -16,7 +16,7 @@ import { SolanaDictionaryV2 } from './solanaDictionaryV2';
16
16
const HTTP_ENDPOINT =
17
17
process . env . HTTP_ENDPOINT ?? 'https://solana.api.onfinality.io/public' ;
18
18
19
- const DEFAULT_DICTIONARY = 'http ://localhost:8080 ' ;
19
+ const DEFAULT_DICTIONARY = 'https ://dict-sol-tyk.subquery.network ' ;
20
20
21
21
const nodeConfig = new NodeConfig ( {
22
22
subquery : 'solana-starter' ,
@@ -205,7 +205,7 @@ describe('solana dictionary v2', () => {
205
205
// }, 100000);
206
206
207
207
it ( 'returns a lastBufferedHeight if there are no block results' , async ( ) => {
208
- const blockHeight = 317_617_480 ;
208
+ const blockHeight = 332_557_468 ;
209
209
const ds : SubqlRuntimeDatasource = {
210
210
kind : SolanaDatasourceKind . Runtime ,
211
211
startBlock : blockHeight ,
@@ -216,7 +216,7 @@ describe('solana dictionary v2', () => {
216
216
handler : 'handleInstruction' ,
217
217
kind : SolanaHandlerKind . Instruction ,
218
218
filter : {
219
- programId : '8A2ap8YTUmCYbQztNZQnebE333PBuWQxztYNpvQ8RXKX ' ,
219
+ programId : 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY ' ,
220
220
} ,
221
221
} ,
222
222
] ,
@@ -228,7 +228,8 @@ describe('solana dictionary v2', () => {
228
228
229
229
const res = await solanaDictionaryV2 . getData ( blockHeight , blockHeight , 100 ) ;
230
230
231
- expect ( res ?. batchBlocks . length ) . toEqual ( 0 ) ;
231
+ expect ( res ?. batchBlocks . length ) . toEqual ( 1 ) ;
232
+ expect ( ( res ?. batchBlocks [ 0 ] as IBlock ) . block . transactions . length ) . toBe ( 7 ) ;
232
233
expect ( res ?. lastBufferedHeight ) . toEqual ( blockHeight ) ;
233
234
} ) ;
234
235
} ) ;
0 commit comments