Add OrchestratableService to Scabbard
This change adds an OrchestratableService implementation to the
Scabbard service.
@@ -35,6 +35,7 @@ use protobuf::Message;
use sawtooth::receipt::store::ReceiptStore;
use splinter::{
consensus::{Proposal, ProposalUpdate},
+ orchestrator::OrchestratableService,
service::{
Service, ServiceDestroyError, ServiceError, ServiceMessageContext, ServiceNetworkRegistry,
ServiceStartError, ServiceStopError,
@@ -512,6 +513,16 @@ impl Service for Scabbard {
}
}
+impl OrchestratableService for Scabbard {
+ fn as_service(&self) -> &dyn Service {
+ self
+ }
+
+ fn clone_box(&self) -> Box<dyn OrchestratableService> {
+ Box::new(self.clone())
+ }
+}
+
#[cfg(test)]
pub mod tests {
use super::*;
