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

account_representative_set RPC returns block of zeros instead of an error #1778

Closed
lephleg opened this issue Feb 24, 2019 · 1 comment

Comments

2 participants
@lephleg
Copy link

commented Feb 24, 2019

Using the RPC call for setting an account representative results in a block consisted by zeros and not effect to the account. An error message should be displayed instead.

Looking at the code this seems to happen when the block passed to wallet->change_async() (L641) is set to nullptr.

Steps to reproduce the issue:
Make an RPC call to the node passing the correct wallet_id and addresses:

curl -d '{  "action": "account_representative_set", "wallet": "EEE8B2EDC1BC212D6976AC80D7660F391B8410ADCC073A581E97BAD731B6F4C3", "account": "xrb_1whu5mc1kga34bhr85q8tdc9jpx6bw9n6x6ktdmtmap1iyj6optb1a53q5j5", "representative" : "xrb_1whu5mc1kga34bhr85q8tdc9jpx6bw9n6x6ktdmtmap1iyj6optb1a53q5j5" }' [::1]:7076

Describe the results you received:
The result received was:

{
    "block": "0000000000000000000000000000000000000000000000000000000000000000"
}

Describe the results you expected:
The result should be an error explaining what caused this:

{
    "error": "Block ended up as null for some reason blah blah"
}

Environment:
Nano node version: v.18
Ubuntu Docker 18.09.02~3 on 18.04

@SergiySW SergiySW self-assigned this Feb 24, 2019

@SergiySW SergiySW added this to the V19.0 milestone Feb 24, 2019

@SergiySW SergiySW added the bug label Feb 24, 2019

@SergiySW SergiySW added this to CP0 in V19 Feb 24, 2019

@SergiySW

This comment has been minimized.

Copy link
Collaborator

commented Mar 1, 2019

Should be fixed with #1779 (v19)

@SergiySW SergiySW closed this Mar 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.