File tree Expand file tree Collapse file tree 4 files changed +5
-15
lines changed Expand file tree Collapse file tree 4 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,7 @@ export function createRosettaMempoolRouter(db: DataStore): RouterWithAsync {
29
29
return ;
30
30
}
31
31
32
- // const limit = req.body.metadata
33
- // ? parseMempoolTxQueryLimit(req.body.metadata.limit ?? 100)
34
- // : 100;
35
- // const offset = req.body.metadata ? parsePagingQueryInput(req.body.metadata.offset ?? 0) : 0;
36
- const { results : txResults , total } = await db . getMempoolTxIdList ( ) ;
32
+ const { results : txResults } = await db . getMempoolTxIdList ( ) ;
37
33
38
34
const transaction_identifiers = txResults . map ( tx => {
39
35
return { hash : tx . tx_id } ;
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ export interface DataStore extends DataStoreEventEmitter {
249
249
limit : number ;
250
250
offset : number ;
251
251
} ) : Promise < { results : DbMempoolTx [ ] ; total : number } > ;
252
- getMempoolTxIdList ( ) : Promise < { results : DbMempoolTxId [ ] ; total : number } > ;
252
+ getMempoolTxIdList ( ) : Promise < { results : DbMempoolTxId [ ] } > ;
253
253
getTx ( txId : string ) : Promise < FoundOrNot < DbTx > > ;
254
254
getTxList ( args : {
255
255
limit : number ;
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class MemoryDataStore extends (EventEmitter as { new (): DataStoreEventEm
178
178
throw new Error ( 'not yet implemented' ) ;
179
179
}
180
180
181
- getMempoolTxIdList ( ) : Promise < { results : DbMempoolTx [ ] ; total : number } > {
181
+ getMempoolTxIdList ( ) : Promise < { results : DbMempoolTx [ ] } > {
182
182
throw new Error ( 'not yet implemented' ) ;
183
183
}
184
184
Original file line number Diff line number Diff line change @@ -1152,13 +1152,7 @@ export class PgDataStore extends (EventEmitter as { new (): DataStoreEventEmitte
1152
1152
return { results : parsed , total : totalQuery . rows [ 0 ] . count } ;
1153
1153
}
1154
1154
1155
- async getMempoolTxIdList ( ) : Promise < { results : DbMempoolTxId [ ] ; total : number } > {
1156
- const totalQuery = await this . pool . query < { count : number } > (
1157
- `
1158
- SELECT COUNT(*)::integer
1159
- FROM mempool_txs
1160
- `
1161
- ) ;
1155
+ async getMempoolTxIdList ( ) : Promise < { results : DbMempoolTxId [ ] } > {
1162
1156
const resultQuery = await this . pool . query < MempoolTxIdQueryResult > (
1163
1157
`
1164
1158
SELECT ${ MEMPOOL_TX_ID_COLUMNS }
@@ -1172,7 +1166,7 @@ export class PgDataStore extends (EventEmitter as { new (): DataStoreEventEmitte
1172
1166
} ;
1173
1167
return tx ;
1174
1168
} ) ;
1175
- return { results : parsed , total : totalQuery . rows [ 0 ] . count } ;
1169
+ return { results : parsed } ;
1176
1170
}
1177
1171
1178
1172
async getTx ( txId : string ) {
You can’t perform that action at this time.
0 commit comments