0chain / 0chain/zboxcli

download cost via lookuphash should work without remotepath

Open
#552 1 comment 0 reactions 1 assignee Claimed by @Zorro30 View on GitHub
Dominant language
Go
Stars
28
Forks
23
PR merge metrics
No merged PRs in 30d

Description

download cost via lookuphash should work without remotepath

currently it requires remotepath

```
./zbox get-download-cost --lookuphash ccbeabede6d6e51e276034e4528cd0f14a92179c68c1dbe12562fabd7d035581 --allocation $ALLOC
0chain-core-sdk [INFO] 2023/10/26 14:59:01.709224 wallet_base.go:327: ******* Wallet SDK Version:v1.10.0-70-g7f7e89b4 ******* (SetLogFile)
0box-sdk [INFO] 2023/10/26 14:59:01.709325 sdk.go:79: ******* Storage SDK Version: v1.10.0-70-g7f7e89b4 *******
0chain-core-sdk [INFO] 2023/10/26 14:59:02.335696 transaction_base.go:143: ******* Wallet SDK Version:v1.10.0-70-g7f7e89b4 ******* (InitZCNSDK)
0box-sdk [DEBUG] 2023/10/26 14:59:02.885183 networkworker.go:119: Get network result:{"miners":["https://demo2.zus.network/miner01","https://demo3.zus.network/miner01","https://demo1.zus.network/miner01"],"sharders":["https://demo2.zus.network/sharder01","https://demo3.zus.network/sharder01","https://demo1.zus.network/sharder01"]}
'remotepath' or 'authticket' flag required
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue is about the `zbox get-download-cost` command requiring a `remotepath` when using `--lookuphash`. Look at the CLI command definitions in the codebase, likely in a file like `cmd/download.go` or similar. Examine how the command parses flags and validates inputs. The fix involves modifying the validation logic to allow `--lookuphash` without `remotepath`. Check the SDK methods called by this command to understand the cost calculation flow. Test the change by running the command with only the lookuphash flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, shell
Domain
backend-api-design, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.