Holochain Forum

EntryValidationData issue when updating entry on the DHT

Hey guys,
Im building a Happ in which any agent can come and update an entry.

The workaround is:

  1. Alice comes and submits an entry in which gets linked to an anchor(anchor->entries)

  2. Bob retrieves the entries by doing, this works as expected:

     get_links(
         &anchor_address, 
         LinkMatch::Exactly("entries"), 
         LinkMatch::Any
     )?;
    
  3. The issue comes when Bob tries to update the entry, Ive made some validation in the entry_def of the entry, specifically in EntryValidationData::Modify where I check some attributes of the entry, ie:

     EntryValidationData::Modify { old_entry, .. } => {
         if old_entry.executed {
             return Err(String::from("Cannot delete entry, entry already executed"));
         }
         Ok(())
     },
    

So when it passes the validation rule and I try to fetch the updated entry from both agents, Alice seems not to get the updated entry but Bob gets the entry updated, I could think that the entry is just updated on Bob’s local chain.
Now if I remove the validation data and try again, both agents are receiven the updated entry. Is this some kind of bug or Im I doing something wrong?

using hdk = "=0.0.42-alpha5"

Thanks

Fixed when updating to hdk to 0.0.46-alpha1