test: integration test with contract deployment, adding interactions and reading state
This commit is contained in:
committed by
Piotr Pędziwiatr
parent
3e71792b57
commit
38287bcb94
@@ -1,7 +1,7 @@
|
||||
import { BlockHeightKey, BlockHeightSwCache, GQLEdgeInterface, InteractionsLoader, LoggerFactory } from '@smartweave';
|
||||
|
||||
/**
|
||||
* This implementation InteractionsLoader tries to limit the amount of interactions
|
||||
* This implementation of the {@link InteractionsLoader} tries to limit the amount of interactions
|
||||
* with GraphQL endpoint. Additionally, it is downloading only the missing interactions
|
||||
* (starting from the latest already cached) - to additionally limit the amount of "paging".
|
||||
*/
|
||||
@@ -33,6 +33,11 @@ export class CacheableContractInteractionsLoader implements InteractionsLoader {
|
||||
);
|
||||
}
|
||||
|
||||
this.logger.trace('Cached:', {
|
||||
cachedHeight,
|
||||
cachedValue
|
||||
});
|
||||
|
||||
const missingInteractions = await this.baseImplementation.load(contractId, cachedHeight + 1, toBlockHeight);
|
||||
|
||||
const result = cachedValue
|
||||
|
||||
Reference in New Issue
Block a user