diff --git a/README.md b/README.md index 45a3cde4..2a6d1485 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,6 @@ Available Commands: download download file from blobbers feed download segment files from remote live feed, and upload get-diff Get difference of local and allocation root - get-download-cost Get downloading cost get-mpt Directly view blockchain data get-upload-cost Get uploading cost getallocation Gets the allocation info @@ -1995,33 +1994,6 @@ An expired write pool, associated with an allocation, can be locked until alloca ./zbox wp-unlock ``` -#### Download cost - -`get-download-cost` determines the cost for downloading the remote file from dStorage. The client must be an -owner, collaborator, or using an auth ticket to determine the download cost of the file. - -| Parameter | Required | Description | default | Valid values | -| ---------- | -------- | ----------------------------------------- | ------- | ------------ | -| allocation | yes | allocation id | | string | -| authticket | no | auth ticket to use if not the owner | | string | -| lookuphash | no | hash of remote file, use with auth ticket | | string | -| remotepath | no | file of which to get stats, use if owner | | string | - -
- get-download-cost - -![image](https://user-images.githubusercontent.com/6240686/124497750-41ef0500-ddb3-11eb-99ea-115a4e234eda.png) - -
-Command: -``` -./zbox get-download-cost --allocation --remotepath /path/file.ext -``` -Response: -``` -0.0000107434 tokens for 10 64KB blocks (24 B) of . -``` - #### Upload cost `get-upload-cost` determines the cost for uploading a local file on dStorage. diff --git a/cmd/getallocation.go b/cmd/getallocation.go index 2431b665..38683763 100644 --- a/cmd/getallocation.go +++ b/cmd/getallocation.go @@ -7,7 +7,6 @@ import ( "github.com/0chain/gosdk/core/common" "github.com/0chain/gosdk/zboxcore/blockchain" - "github.com/0chain/gosdk/zboxcore/fileref" "github.com/0chain/gosdk/zboxcore/logger" "github.com/0chain/gosdk/zboxcore/sdk" "github.com/0chain/zboxcli/util" @@ -112,7 +111,6 @@ var getallocationCmd = &cobra.Command{ fmt.Println(" price:") fmt.Println(" time_unit: ", alloc.TimeUnit) - fmt.Println(" read_price: ", calculateDownloadCost(alloc, GB, (GB+fileref.CHUNK_SIZE-1)/fileref.CHUNK_SIZE), "/ GB (by 64KB)") fmt.Println(" write_price:", uploadCostFor1GB(alloc), fmt.Sprintf("/ GB / %s", alloc.TimeUnit)) }, }