v0.3.12-pre.006-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
||||
// version: 8
|
||||
// version: 9
|
||||
|
||||
use sha2::Digest; // rust-rules: trait-import
|
||||
|
||||
@@ -731,7 +731,7 @@ fn route_yellowstone_update(
|
||||
ksp_onchain_transport_lib::YellowstoneSubscribeUpdate::Account(_)
|
||||
| ksp_onchain_transport_lib::YellowstoneSubscribeUpdate::Ping(_)
|
||||
| ksp_onchain_transport_lib::YellowstoneSubscribeUpdate::Pong(_)
|
||||
| ksp_onchain_transport_lib::YellowstoneSubscribeUpdate::Entry(_) => std::result::Result::Ok(()),
|
||||
| ksp_onchain_transport_lib::YellowstoneSubscribeUpdate::Entry(_) => return std::result::Result::Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,10 +840,12 @@ impl RawTransactionIngestHydrationCoordinator {
|
||||
|
||||
fn start_hydrations(&mut self, source: &crate::RawTransactionIngestYellowstoneSource) -> ksp_core_lib::Result<()> {
|
||||
while self.tasks.len() < self.max_in_flight {
|
||||
let key = self
|
||||
.pending
|
||||
.iter()
|
||||
.find_map(|(key, pending)| if pending.in_flight { std::option::Option::None } else { std::option::Option::Some(key.clone()) });
|
||||
let key = self.pending.iter().find_map(|(key, pending)| {
|
||||
if pending.in_flight {
|
||||
return std::option::Option::None;
|
||||
}
|
||||
return std::option::Option::Some(key.clone());
|
||||
});
|
||||
let key = match key {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => break,
|
||||
@@ -946,6 +948,9 @@ fn hydration_key(
|
||||
source: &crate::RawTransactionIngestYellowstoneSource,
|
||||
signal: &RawTransactionIngestSourceSignal,
|
||||
) -> ksp_core_lib::Result<RawTransactionIngestHydrationKey> {
|
||||
if signal.network != source.network {
|
||||
return std::result::Result::Err(crate::runtime_error("hydration.network_mismatch"));
|
||||
}
|
||||
let commitment = match hydration_commitment(source) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
|
||||
Reference in New Issue
Block a user