Skip to content

Commit

Permalink
update_entry_relaxed
Browse files Browse the repository at this point in the history
  • Loading branch information
ddd-mtl committed Sep 4, 2024
1 parent 5ff101d commit a2f0edc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/relaxed.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
use hdk::prelude::*;

/// Note: same implementation as update_entry() but with Relaxed chain ordering
pub fn update_entry_relaxed<I, E>(hash: ActionHash, input: I) -> ExternResult<ActionHash>
where
Entry: TryFrom<I, Error = E>,
WasmError: From<E>,
{
let input = UpdateInput {
original_action_address: hash,
entry: input.try_into()?,
chain_top_ordering: ChainTopOrdering::Relaxed,
};
update(input)
}


/// Note: same implementation as create_entry() but with Relaxed chain ordering
pub fn create_entry_relaxed<I, E, E2>(typed: I) -> ExternResult<ActionHash>
where
Expand Down

0 comments on commit a2f0edc

Please sign in to comment.