(key: &[u8; OperationId::SIZE], bytes: &[u8])
| 17 | } |
| 18 | |
| 19 | fn decode_operation_row(key: &[u8; OperationId::SIZE], bytes: &[u8]) -> PristineResult<Operation> { |
| 20 | let key_id = OperationId::from_bytes(*key); |
| 21 | let operation = decode_operation(bytes).map_err(operation_serialization_error)?; |
| 22 | if operation.id() != key_id { |
| 23 | return Err(PristineError::Inconsistent { |
| 24 | message: format!( |
| 25 | "OPERATIONS key {} contains canonical operation {}", |
| 26 | key_id, |
| 27 | operation.id() |
| 28 | ), |
| 29 | }); |
| 30 | } |
| 31 | Ok(operation) |
| 32 | } |
| 33 | |
| 34 | fn decode_effect_receipt_row(key: &[u8; 64], bytes: &[u8]) -> PristineResult<EffectReceipt> { |
| 35 | let (key_operation, key_receipt) = decode_effect_receipt_key(key); |
no test coverage detected