Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions server_manager/src/core/journal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,3 @@ pub fn now_iso8601() -> String {
.format(&Rfc3339)
.unwrap_or_else(|_| "1970-01-01T00:00:00Z".to_string())
}

/// Generates a 128-bit random hex transaction ID.
pub fn generate_op_id() -> String {
format!(
"{:016x}{:016x}",
rand::random::<u64>(),
rand::random::<u64>()
)
}
10 changes: 9 additions & 1 deletion server_manager/tests/contract_journal.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
use server_manager::core::journal::{
generate_op_id, now_iso8601, CompensatoryAction, Journal, JournalEntry, StepStatus,
now_iso8601, CompensatoryAction, Journal, JournalEntry, StepStatus,
};

fn generate_op_id() -> String {
format!(
"{:016x}{:016x}",
rand::random::<u64>(),
rand::random::<u64>()
)
}
use std::collections::HashMap;
use std::fs;

Expand Down
Loading