XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

State objects not created if the reserve not enough. No error code return in state_set. #26

Closed SavindaSenevirathne closed 1 year ago

SavindaSenevirathne commented 2 years ago

Issue Description

State objects are not created if the account reserve is not enough. state_set doesn't return any error code.

Steps to Reproduce

Sample code: state_reserve_not_creating.zip

Expected Result

Transaction invoking the state creation should be rejected by the hook since state creation is not finished properly.

Actual Result

Transaction invoking the state creation is accepted by the hook since no error is returned from set_state. But no state object is created.

Environment

Ubuntu 18.04 Hook testnet - wss://hooks-testnet.xrpl-labs.com

RichardAH commented 1 year ago

I believe this is fixed. If you could please test on your end? I will also add this to the unit tests shortly.

chalith commented 1 year ago

@RichardAH tested. Now the issue is fixed.