Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • crown-core crown-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 75
    • Issues 75
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Crown
  • crown-corecrown-core
  • Issues
  • #359

Closed
Open
Created Feb 13, 2020 by Mark Brooker@walkjiveflyMaintainer

QA: nftproto list validation failures

Summary

QA: nftproto list accepts negative count and skip values

Steps to reproduce

crown-cli nftproto list -1 -1

Expected behavior

An error message

Problematic behavior

Code seems to mostly ignore the negative signs and simply use the absolute value, until it doesn't.

mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto list 3 0 352003 1
[
    {
        "registrationTxHash" : "838a61cf526aaf584eace3dbbd11d99108fb2db92baa47f1104e9d0a1d97a3a4"
    },
    {
        "registrationTxHash" : "d3042a9ae18645218704f9b31374b4255fa822430349ac0dab281357afb9e51c"
    },
    {
        "registrationTxHash" : "b9da4d9e64336b7acd7d957fc2dfcdfea1b905768c4cf391eca9b04577a8aab5"
    }
]
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto list -1 0 352003 1[
    {
        "registrationTxHash" : "b9da4d9e64336b7acd7d957fc2dfcdfea1b905768c4cf391eca9b04577a8aab5"
    }
]
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto list 1 1 352003 1
[
    {
        "registrationTxHash" : "d3042a9ae18645218704f9b31374b4255fa822430349ac0dab281357afb9e51c"
    }
]
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto list -1 1 352003 1
[
    {
        "registrationTxHash" : "20021ca0f821a8e887225c423eeb36ff01a77b9fbd092b6b503ded3c69a2c685"
    }
]
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto getbytxid 20021ca0f821a8e887225c423eeb36ff01a77b9fbd092b6b503ded3c69a2c685
error: {"code":-1,"message":"Can't find an NFT protocol record: 20021ca0f821a8e887225c423eeb36ff01a77b9fbd092b6b503ded3c69a2c685"}
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto list 1 -1 352003 1
[
    {
        "registrationTxHash" : "20021ca0f821a8e887225c423eeb36ff01a77b9fbd092b6b503ded3c69a2c685"
    }
]

Crown-core environment info

Ubuntu 16.04

Crown-core application info

v0.13.9.3 build 1166

Relevant logs, dumps and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code; it's very hard to read otherwise.)

Drop full logs & dumps here: https://nextcloud.crownplatform.com/index.php/s/Q6H8enXNmJsQYCD

Possible fixes

(Any comments on what you think might be responsible for the problem, if you have particular insight.)

/cc @artem

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking