MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / decode_effect_receipt_row

Function decode_effect_receipt_row

atomic-core/src/pristine/txn/read.rs:79–92  ·  view source on GitHub ↗
(key: &[u8; 64], bytes: &[u8])

Source from the content-addressed store, hash-verified

77}
78
79fn decode_effect_receipt_row(key: &[u8; 64], bytes: &[u8]) -> PristineResult<EffectReceipt> {
80 let (key_operation, key_receipt) = decode_effect_receipt_key(key);
81 let receipt = decode_effect_receipt(bytes).map_err(operation_serialization_error)?;
82 if receipt.id() != key_receipt || receipt.payload().operation != key_operation {
83 return Err(PristineError::Inconsistent {
84 message: format!(
85 "EFFECT_RECEIPTS key ({key_operation}, {key_receipt}) contains receipt ({}, {})",
86 receipt.payload().operation,
87 receipt.id()
88 ),
89 });
90 }
91 Ok(receipt)
92}
93
94fn decode_working_copy_row(
95 key: &[u8; WorkingCopyId::SIZE],

Callers 1

get_effect_receiptsMethod · 0.70

Calls 4

decode_effect_receiptFunction · 0.85
idMethod · 0.45
payloadMethod · 0.45

Tested by

no test coverage detected