Skip to content

Commit

Permalink
fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
modship committed Oct 22, 2024
1 parent 5bb0912 commit 9570f65
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions assembly/std/deferredCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ import { Slot } from './context';
* @returns Mas amount
*
*/
export function deferredCallQuote(targetSlot: Slot, maxGas: u64, paramsSize: u64): u64 {
return env.deferredCallQuote(targetSlot.period, targetSlot.thread, maxGas, paramsSize);
export function deferredCallQuote(
targetSlot: Slot,
maxGas: u64,
paramsSize: u64,
): u64 {
return env.deferredCallQuote(
targetSlot.period,
targetSlot.thread,
maxGas,
paramsSize,
);
}

/**
Expand Down Expand Up @@ -91,12 +100,16 @@ export function findCheapestSlot(
let cheapestSlotPrice: u64 = deferredCallQuote(
new Slot(startPeriod, 0),
maxGas,
paramsSize
paramsSize,
);

for (let period = startPeriod; period <= endPeriod; period++) {
for (let thread: u8 = 1; thread < 32; thread++) {
const price = deferredCallQuote(new Slot(period, thread), maxGas, paramsSize);
const price = deferredCallQuote(
new Slot(period, thread),
maxGas,
paramsSize,
);
if (price < cheapestSlotPrice) {
cheapestSlotPrice = price;
cheapestSlotPeriod = period;
Expand Down

0 comments on commit 9570f65

Please sign in to comment.