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

[ObjectRuntime] ObjectChange value is null and fields are empty #2657

Open
jolestar opened this issue Sep 19, 2024 · 0 comments
Open

[ObjectRuntime] ObjectChange value is null and fields are empty #2657

jolestar opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working skill::rust Need the rust language skill to complete the issue
Milestone

Comments

@jolestar
Copy link
Contributor

Rooch version

v0.7.2

What did you do?

Add fields to a table, then remove the fields in the same transaction.

What did you see happen?

The transaction changeset contains ObjectChange:

value is null and fields are empty

 {
          "metadata": {
            "id": "0x929cac47a35d328af9bb64235cbb38b4a45849b28af91836f32f227fd0145d46",
            "owner": "rooch1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqhxqaen",
            "owner_bitcoin_address": null,
            "flag": 0,
            "state_root": "0x5350415253455f4d45524b4c455f504c414345484f4c4445525f484153480000",
            "size": "0",
            "created_at": "0",
            "updated_at": "0",
            "object_type": "0x2::table::TablePlaceholder"
          },
          "value": null,
          "fields": []
        },

What did you expect to see?

The debug_assert should not panic.

for obj_change in changes {
let metadata = obj_change.metadata.clone();
debug_assert!(obj_change.value.is_some() || !obj_change.fields.is_empty());

@jolestar jolestar added the bug Something isn't working label Sep 19, 2024
@jolestar jolestar added this to the Rooch v0.8 milestone Sep 19, 2024
@jolestar jolestar added the skill::rust Need the rust language skill to complete the issue label Sep 19, 2024
@jolestar jolestar changed the title [changeset] ObjectChange value is null and fields are empty [ObjectRuntime] ObjectChange value is null and fields are empty Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skill::rust Need the rust language skill to complete the issue
Projects
Status: No status
Development

No branches or pull requests

1 participant