From ca0e1b0a354c514e045f06adf7b47f944e098e82 Mon Sep 17 00:00:00 2001 From: Miguel Fernandez Date: Tue, 24 Jan 2023 12:06:10 +0100 Subject: [PATCH] Comment on precondition for TxId --- query-engine/core/src/interactive_transactions/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/query-engine/core/src/interactive_transactions/mod.rs b/query-engine/core/src/interactive_transactions/mod.rs index 1f99c1f6f0cb..d3c73f705123 100644 --- a/query-engine/core/src/interactive_transactions/mod.rs +++ b/query-engine/core/src/interactive_transactions/mod.rs @@ -57,6 +57,8 @@ where { fn from(s: T) -> Self { let contents = s.into(); + // This postcondition is to ensure that the TxId is long enough as to be able to derive + // a TraceId from it. assert!( contents.len() >= MINIMUM_TX_ID_LENGTH, "minimum length for a TxId ({}) is {}, but was {}",