Skip to content

Commit

Permalink
fix(arns): remove await to cache, fix config var to resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Sep 10, 2024
1 parent 0041495 commit f1bd0cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/resolution/composite-arns-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import winston from 'winston';
import { KVBufferStore, NameResolution, NameResolver } from '../types.js';
import { NameResolution, NameResolver } from '../types.js';
import * as metrics from '../metrics.js';
import { KvArnsStore } from '../store/kv-arns-store.js';

export class CompositeArNSResolver implements NameResolver {
private log: winston.Logger;
private resolvers: NameResolver[];
private cache: KVBufferStore;
private cache: KvArnsStore;

constructor({
log,
Expand Down Expand Up @@ -70,7 +70,7 @@ export class CompositeArNSResolver implements NameResolver {
});
const resolution = await resolver.resolve(name);
if (resolution.resolvedId !== undefined) {
await this.cache.set(name, Buffer.from(JSON.stringify(resolution)));
this.cache.set(name, Buffer.from(JSON.stringify(resolution)));
this.log.info('Resolved name', { name, resolution });
return resolution;
}
Expand Down
2 changes: 1 addition & 1 deletion src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export const arnsResolverCache = new KvArnsStore({

export const nameResolver = createArNSResolver({
log,
trustedGatewayUrl: config.TRUSTED_GATEWAY_URL,
trustedGatewayUrl: config.TRUSTED_ARNS_GATEWAY_URL,
resolutionOrder: config.ARNS_RESOLVER_PRIORITY_ORDER,
networkProcess: arIO,
cache: arnsResolverCache,
Expand Down

0 comments on commit f1bd0cf

Please sign in to comment.