XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

Bug Report: deleting namespace, also deletes the hook #59

Closed f1f47a23 closed 1 year ago

f1f47a23 commented 1 year ago

Issue Description

while I was on notary.c hook sample, I have detected this possible bug as in the title.

Steps to Reproduce

in notary sample:

1) set a hook

2) reset namespace

Expected Result

hooks documentation: Namespace Reset: ......... If the Corresponding Hook exists, it remains, nothing happens to it. https://xrpl-hooks.readme.io/docs/sethook-transaction#namespace-reset

Actual Result

account showing all the hooks transactions https://hooks-testnet-v2-explorer.xrpl-labs.com/rnLTR74s7sqhdi1p2KiRsdY9VtV7eFzdyD

Environment

https://hooks-builder.xrpl.org

Supporting Files

simple notary hook sample files

RichardAH commented 1 year ago

CreateCode: "" is the delete hook operation, it should not be specified. However I was also able to reproduce your issue when it wasn't specified so this seems like a confirmed bug. I will chase it up in code, thanks!

f1f47a23 commented 1 year ago

Hi Sorry, I had to specify the details better. That transaction was actually a "delete hook" operation sent by the online hook builder. Now the real "reset namespace" transaction is lost in the ledger history. But I just sent a new "reset namespace" transaction and I confirm that indeed the hook was also deleted along with the namespace

https://hooks-testnet-v2-explorer.xrpl-labs.com/tx/4BF5FFA02B1101BC5FEC1C6FAB4B7FC23C692FC2E49457746C0D59760B97B27D

RichardAH commented 1 year ago

I'll circle back and ask you to test when this fix is live on v2 testnet, thanks!

RichardAH commented 1 year ago

this should be fixed please re-open if not