0.7.1 for Real ! - it was 0.7.0 before, not 0.7.1 !!

This commit is contained in:
2026-04-26 11:44:58 +02:00
parent 60b8841895
commit ac5bf10af6
26 changed files with 2560 additions and 388 deletions

View File

@@ -98,6 +98,7 @@ pub struct KbWsTransactionResolutionRelayStats {
pub struct KbTransactionResolutionService {
http_pool: std::sync::Arc<crate::HttpEndpointPool>,
persistence: crate::KbDetectionPersistenceService,
transaction_model: crate::KbTransactionModelService,
http_role: std::string::String,
resolved_signatures:
std::sync::Arc<tokio::sync::Mutex<std::collections::HashSet<std::string::String>>>,
@@ -107,12 +108,15 @@ impl KbTransactionResolutionService {
/// Creates a new transaction resolution service.
pub fn new(
http_pool: std::sync::Arc<crate::HttpEndpointPool>,
persistence: crate::KbDetectionPersistenceService,
database: std::sync::Arc<crate::KbDatabase>,
http_role: std::string::String,
) -> Self {
let persistence = crate::KbDetectionPersistenceService::new(database.clone());
let transaction_model = crate::KbTransactionModelService::new(database);
Self {
http_pool,
persistence,
transaction_model,
http_role,
resolved_signatures: std::sync::Arc::new(tokio::sync::Mutex::new(
std::collections::HashSet::new(),
@@ -274,12 +278,25 @@ impl KbTransactionResolutionService {
.get("slot")
.and_then(serde_json::Value::as_u64)
.or(request.slot_hint);
let projection_result = self
.transaction_model
.persist_resolved_transaction(
request.signature.as_str(),
request.source_endpoint_name.clone(),
&transaction_value,
)
.await;
let projected_transaction_id = match projection_result {
Ok(projected_transaction_id) => projected_transaction_id,
Err(error) => return Err(error),
};
let payload = serde_json::json!({
"status": "resolved",
"signature": request.signature.clone(),
"triggerMethod": request.trigger_method.clone(),
"sourceEndpointName": request.source_endpoint_name.clone(),
"slotHint": request.slot_hint,
"projectedTransactionId": projected_transaction_id,
"triggerPayload": request.trigger_payload.clone(),
"transaction": transaction_value
});