Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing a proposal with --key value from anything except a statement should return an error #80

Open
NickVolynkin opened this issue Jul 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@NickVolynkin
Copy link
Contributor

NickVolynkin commented Jul 11, 2023

Pushed a proposal, providing a request ID instead of a statement ID by mistake. (I've formatted the JSON output):

root@61db058b84db:/proof-market-toolchain# python3 scripts/proposal_tools.py push --key 93846511 --cost 2
Limit proposal:
{
  '_key': '93849751',
  '_id': 'proposal/93849751',
  '_rev': '_gSXAKnm---',
  'statement_key': '93846511',
  'cost': 2,
  'sender': 'nickvolynkin',
  'wait_period': None,
  'eval_time': None,
  'createdOn': 1689100890776,
  'updatedOn': 1689100890776,
  'status': 'created'
}

As you can see, it has status=created. This request must return an error because there is no statement with this id.

Trying to find my proposal right after pushing it:

root@61db058b84db:/proof-market-toolchain# python3 scripts/proposal_tools.py get --key 93846511
Error: 204

93846511 is in fact a request for statement 93843771:

root@61db058b84db:/proof-market-toolchain# python3 scripts/request_tools.py get --key 93846511
Limit request:	 {
    "_key": "93846511",
    "cost": 2,
    "sender": "nickvolynkin",
    "statement_key": "93843771",
    "status": "created"
}
@NickVolynkin NickVolynkin added the bug Something isn't working label Jul 11, 2023
@NickVolynkin NickVolynkin changed the title Getting a 204 response from proposal_tools.py get after pushing a proposal Pushing a proposal with --key value from another proposal Jul 11, 2023
@NickVolynkin NickVolynkin changed the title Pushing a proposal with --key value from another proposal Pushing a proposal with --key value from another proposal should return an error Jul 11, 2023
@NickVolynkin NickVolynkin changed the title Pushing a proposal with --key value from another proposal should return an error Pushing a proposal with --key value from anything except a statement should return an error Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant