Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
szynwelski committed Nov 29, 2023
1 parent fe30f9a commit 0f5c58c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/legacy/smartweave-global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CacheKey, SortKeyCache } from '../cache/SortKeyCache';
import { SortKeyCacheRangeOptions } from '../cache/SortKeyCacheRangeOptions';
import { InteractionState } from '../contract/states/InteractionState';
import { safeGet } from '../utils/utils';
import { Buffer } from 'warp-isomorphic';

/**
*
Expand Down Expand Up @@ -266,6 +267,9 @@ export class SWBlock {
}
}

/**
* @deprecated VRF mechanism will not be used after the decentralized sequencer is launched
*/
export class SWVrf {
constructor(private readonly smartWeaveGlobal: SmartWeaveGlobal) {}

Expand All @@ -278,7 +282,9 @@ export class SWVrf {
return this.smartWeaveGlobal._activeTx.vrf.bigint;
}

// returns a random value in a range from 1 to maxValue
/**
* @deprecated use SmartWeave.randomNumber function instead
*/
randomInt(maxValue: number): number {
if (this.smartWeaveGlobal._activeTx?.random) {
return this.smartWeaveGlobal.randomNumber(maxValue);
Expand Down

0 comments on commit 0f5c58c

Please sign in to comment.