File tree Expand file tree Collapse file tree 3 files changed +7
-25
lines changed
Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -386,24 +386,16 @@ def create(
386386 if token_amount :
387387 estimated_publishing_cost = token_amount
388388 else :
389- time_until_next_epoch = self .blockchain_service .time_until_next_epoch ()
390- epoch_length = self .blockchain_service .epoch_length ()
391389 stake_weighted_average_ask = (
392390 self .blockchain_service .get_stake_weighted_average_ask ()
393391 )
394392
395393 # Convert to integers and perform calculation
396394 estimated_publishing_cost = (
397- (
398- int (stake_weighted_average_ask )
399- * (
400- int (epochs_num ) * int (1e18 )
401- + (int (time_until_next_epoch ) * int (1e18 )) // int (epoch_length )
402- )
403- * int (dataset_size )
404- )
395+ int (stake_weighted_average_ask )
396+ * int (epochs_num )
397+ * int (dataset_size )
405398 // 1024
406- // int (1e18 )
407399 )
408400
409401 knowledge_collection_id = None
Original file line number Diff line number Diff line change @@ -398,26 +398,16 @@ async def create(
398398 if token_amount :
399399 estimated_publishing_cost = token_amount
400400 else :
401- time_until_next_epoch = (
402- await self .blockchain_service .time_until_next_epoch ()
403- )
404- epoch_length = await self .blockchain_service .epoch_length ()
405401 stake_weighted_average_ask = (
406402 await self .blockchain_service .get_stake_weighted_average_ask ()
407403 )
408404
409405 # Convert to integers and perform calculation
410406 estimated_publishing_cost = (
411- (
412- int (stake_weighted_average_ask )
413- * (
414- int (epochs_num ) * int (1e18 )
415- + (int (time_until_next_epoch ) * int (1e18 )) // int (epoch_length )
416- )
417- * int (dataset_size )
418- )
407+ int (stake_weighted_average_ask )
408+ * int (epochs_num )
409+ * int (dataset_size )
419410 // 1024
420- // int (1e18 )
421411 )
422412
423413 knowledge_collection_id = None
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " dkg"
3- version = " 8.0.14 "
3+ version = " 8.1.0 "
44description = " Python library for interacting with the OriginTrail Decentralized Knowledge Graph"
55authors = [" Uladzislau Hubar <hubar.uladzislau@gmail.com>, Zvonimir Sculac <zvonimir.sculac@origin-trail.com>" ]
66license = " Apache-2.0"
You can’t perform that action at this time.
0 commit comments