0.7.15
This commit is contained in:
@@ -98,12 +98,13 @@ pub struct KbWsTransactionResolutionRelayStats {
|
||||
pub struct KbTransactionResolutionService {
|
||||
http_pool: std::sync::Arc<crate::HttpEndpointPool>,
|
||||
persistence: crate::KbDetectionPersistenceService,
|
||||
http_role: std::string::String,
|
||||
transaction_model: crate::KbTransactionModelService,
|
||||
dex_decode_service: crate::KbDexDecodeService,
|
||||
dex_detect_service: crate::KbDexDetectService,
|
||||
launch_origin_service: crate::KbLaunchOriginService,
|
||||
pool_origin_service: crate::KbPoolOriginService,
|
||||
http_role: std::string::String,
|
||||
wallet_observation_service: crate::KbWalletObservationService,
|
||||
resolved_signatures:
|
||||
std::sync::Arc<tokio::sync::Mutex<std::collections::HashSet<std::string::String>>>,
|
||||
}
|
||||
@@ -121,15 +122,17 @@ impl KbTransactionResolutionService {
|
||||
let dex_detect_service = crate::KbDexDetectService::new(database.clone());
|
||||
let launch_origin_service = crate::KbLaunchOriginService::new(database.clone());
|
||||
let pool_origin_service = crate::KbPoolOriginService::new(database.clone());
|
||||
let wallet_observation_service = crate::KbWalletObservationService::new(database.clone());
|
||||
Self {
|
||||
http_pool,
|
||||
persistence,
|
||||
http_role,
|
||||
transaction_model,
|
||||
dex_decode_service,
|
||||
dex_detect_service,
|
||||
launch_origin_service,
|
||||
pool_origin_service,
|
||||
http_role,
|
||||
wallet_observation_service,
|
||||
resolved_signatures: std::sync::Arc::new(tokio::sync::Mutex::new(
|
||||
std::collections::HashSet::new(),
|
||||
)),
|
||||
@@ -333,6 +336,15 @@ impl KbTransactionResolutionService {
|
||||
Err(error) => return Err(error),
|
||||
};
|
||||
let pool_origin_count = pool_origins.len();
|
||||
let wallet_observations_result = self
|
||||
.wallet_observation_service
|
||||
.record_transaction_by_signature(request.signature.as_str())
|
||||
.await;
|
||||
let wallet_observations = match wallet_observations_result {
|
||||
Ok(wallet_observations) => wallet_observations,
|
||||
Err(error) => return Err(error),
|
||||
};
|
||||
let wallet_participation_count = wallet_observations.len();
|
||||
let detection_results = match detection_results_result {
|
||||
Ok(detection_results) => detection_results,
|
||||
Err(error) => return Err(error),
|
||||
@@ -349,6 +361,7 @@ impl KbTransactionResolutionService {
|
||||
"detectedObjectCount": detected_object_count,
|
||||
"launchAttributionCount": launch_attribution_count,
|
||||
"poolOriginCount": pool_origin_count,
|
||||
"walletParticipationCount": wallet_participation_count,
|
||||
"triggerPayload": request.trigger_payload.clone(),
|
||||
"transaction": transaction_value
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user