Uploaded image for project: 'Indy Node'
  1. Indy Node
  2. INDY-1318

--network parameter of read_ledger doesn't work

    Details

    • Type: Bug
    • Status: Complete
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Environment:

      indy-node 1.3.405

    • Epic Link:
    • Sprint:
      EV 18.11 Stability/ViewChange

      Description

      Steps to Reproduce:
      1. Setup the pool with 'sandbox' network in config and write some txns.
      2. Run `sudo su - indy -c "read_ledger --type domain --network sandbox"`.
      => Read_ledger works fine, sandbox domain ledger is shown.
      3. Run `sudo su - indy -c "read_ledger --type domain --count --network live"`.
      => Sandbox domain ledger is shown.
      Expected: error should be shown.

      4. Stop indy-node, rename `/var/lib/indy/sandbox` to `/var/lib/indy/live`.
      5. Run `sudo su - indy -c "read_ledger --type domain --count --network live"`.
      => 

      root@fef6dd9bf54e:/var/lib/indy# sudo su - indy -c "read_ledger --type domain --network live"
      Traceback (most recent call last):
      File "/usr/local/bin/read_ledger", line 161, in <module>
      ledger_data_dir = get_ledger_dir(args.node_name, args.client_name, args.network)
      File "/usr/local/bin/read_ledger", line 75, in get_ledger_dir
      dirs = os.listdir(config_helper.ledger_data_dir)
      FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/indy/sandbox/data'
       
      

      Actual Results:
      Read_ledger works only with network specified in indy_config.py.

      Expected Results:
      It should work with network specified in --network parameter (ideally, value from indy_config.py should be used as default value of --network parameter if it is not specified), or --network parameter should be removed from script parameters.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zhigunenko.dsr NIkita Zhigunenko
                Reporter:
                ozheregelya Olga Zheregelya
                Watchers:
                Andrew Nikitin, NIkita Zhigunenko, Olga Zheregelya
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: