forked from cerc-io/ipld-eth-server
Optimize GQL and getBlock APIs (#201)
* Add optional block number filter to getLogs API * Use block number while fetching block with transactions * Fix for failing tests * Use block number when fetching block objects * Use block number when fetching a tx by hash * Add back methods to get block objects by block hash * Update run_unit_test.sh Removing echo command, as it seems to be only change in CICD. * Increase wait time for db setup in unit test job Co-authored-by: Michael <michael@abastionofsanity.com>
This commit is contained in:
@@ -296,7 +296,7 @@ var _ = Describe("GraphQL", func() {
|
||||
allEthHeaderCIDsResp, err := client.AllEthHeaderCIDs(ctx, graphql.EthHeaderCIDCondition{BlockHash: &blockHash})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
headerCID, err := backend.Retriever.RetrieveHeaderAndTxCIDsByBlockHash(blocks[1].Hash())
|
||||
headerCID, err := backend.Retriever.RetrieveHeaderAndTxCIDsByBlockHash(blocks[1].Hash(), nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
Expect(len(allEthHeaderCIDsResp.Nodes)).To(Equal(1))
|
||||
@@ -311,7 +311,7 @@ var _ = Describe("GraphQL", func() {
|
||||
ethTransactionCIDResp, err := client.EthTransactionCIDByTxHash(ctx, txHash)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
txCID, err := backend.Retriever.RetrieveTxCIDByHash(txHash)
|
||||
txCID, err := backend.Retriever.RetrieveTxCIDByHash(txHash, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
compareEthTxCID(*ethTransactionCIDResp, txCID)
|
||||
|
||||
Reference in New Issue
Block a user