Skip to content

Commit cd1fcbb

Browse files
author
Andres D. Molins
committed
Fix: Require at least 1 hour of credits to start the instance.
1 parent 08a33ec commit cd1fcbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/aleph/vm/orchestrator/views/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ async def notify_allocation(request: web.Request):
654654

655655
credit_balance = await fetch_credit_balance_of_address(message.content.address)
656656

657-
required_credits = await fetch_execution_price(item_hash, [PaymentType.credit])
657+
credits_price_x_second = await fetch_execution_price(item_hash, [PaymentType.credit])
658+
required_credits = Decimal(credits_price_x_second) * Decimal(60) * Decimal(60)
658659
logger.debug(
659660
f"Required credit balance for Address {message.content.address} executions: {required_credits}, {item_hash}"
660661
)

0 commit comments

Comments
 (0)