(key: &[u8; 64], bytes: &[u8])
| 77 | } |
| 78 | |
| 79 | fn 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 | |
| 94 | fn decode_working_copy_row( |
| 95 | key: &[u8; WorkingCopyId::SIZE], |
no test coverage detected