(key: &[u8; OperationId::SIZE], bytes: &[u8])
| 62 | } |
| 63 | |
| 64 | fn decode_operation_row(key: &[u8; OperationId::SIZE], bytes: &[u8]) -> PristineResult<Operation> { |
| 65 | let key_id = OperationId::from_bytes(*key); |
| 66 | let operation = decode_operation(bytes).map_err(operation_serialization_error)?; |
| 67 | if operation.id() != key_id { |
| 68 | return Err(PristineError::Inconsistent { |
| 69 | message: format!( |
| 70 | "OPERATIONS key {} contains canonical operation {}", |
| 71 | key_id, |
| 72 | operation.id() |
| 73 | ), |
| 74 | }); |
| 75 | } |
| 76 | Ok(operation) |
| 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); |
no test coverage detected