1
- use std:: { collections :: HashMap , sync:: Arc } ;
1
+ use std:: sync:: Arc ;
2
2
3
3
use mithril_common:: {
4
4
api_version:: APIVersionProvider ,
@@ -11,7 +11,7 @@ use mithril_common::{
11
11
CardanoImmutableDigester , DumbImmutableFileObserver , ImmutableDigester ,
12
12
ImmutableFileObserver , ImmutableFileSystemObserver ,
13
13
} ,
14
- entities:: { Beacon , CertificatePending , Epoch , PartyId , SingleSignatures } ,
14
+ entities:: { CertificatePending , Epoch } ,
15
15
era:: {
16
16
adapters:: { EraReaderAdapterBuilder , EraReaderDummyAdapter } ,
17
17
EraChecker , EraMarker , EraReader , EraReaderAdapter , SupportedEra ,
@@ -52,8 +52,8 @@ use crate::{
52
52
CertificateStore , Configuration , DependencyManager , DumbSnapshotUploader , DumbSnapshotter ,
53
53
GzipSnapshotter , LocalSnapshotStore , LocalSnapshotUploader , MithrilSignerRegisterer ,
54
54
MultiSigner , MultiSignerImpl , ProtocolParametersStore , ProtocolParametersStorer ,
55
- RemoteSnapshotUploader , SingleSignatureStore , SnapshotStore , SnapshotUploader ,
56
- SnapshotUploaderType , Snapshotter , VerificationKeyStore ,
55
+ RemoteSnapshotUploader , SnapshotStore , SnapshotUploader , SnapshotUploaderType , Snapshotter ,
56
+ VerificationKeyStore ,
57
57
} ;
58
58
59
59
use super :: { DependenciesBuilderError , Result } ;
@@ -100,9 +100,6 @@ pub struct DependenciesBuilder {
100
100
/// Verification key store.
101
101
pub verification_key_store : Option < Arc < VerificationKeyStore > > ,
102
102
103
- /// Signer single signature store.
104
- pub single_signature_store : Option < Arc < SingleSignatureStore > > ,
105
-
106
103
/// Protocol parameter store.
107
104
pub protocol_parameters_store : Option < Arc < ProtocolParametersStore > > ,
108
105
@@ -192,7 +189,6 @@ impl DependenciesBuilder {
192
189
certificate_pending_store : None ,
193
190
certificate_store : None ,
194
191
verification_key_store : None ,
195
- single_signature_store : None ,
196
192
protocol_parameters_store : None ,
197
193
cardano_cli_runner : None ,
198
194
chain_observer : None ,
@@ -434,49 +430,6 @@ impl DependenciesBuilder {
434
430
Ok ( self . verification_key_store . as_ref ( ) . cloned ( ) . unwrap ( ) )
435
431
}
436
432
437
- async fn build_single_signature_store ( & mut self ) -> Result < Arc < SingleSignatureStore > > {
438
- let adapter: Box <
439
- dyn StoreAdapter < Key = Beacon , Record = HashMap < PartyId , SingleSignatures > > ,
440
- > = match self . configuration . environment {
441
- ExecutionEnvironment :: Production => {
442
- let adapter = SQLiteAdapter :: new (
443
- "single_signature_legacy" ,
444
- self . get_sqlite_connection ( ) . await ?,
445
- )
446
- . map_err ( |e| DependenciesBuilderError :: Initialization {
447
- message : "Cannot create SQLite adapter for SingleSignatureStore." . to_string ( ) ,
448
- error : Some ( e. into ( ) ) ,
449
- } ) ?;
450
-
451
- Box :: new ( adapter)
452
- }
453
- _ => {
454
- let adapter = MemoryAdapter :: new ( None ) . map_err ( |e| {
455
- DependenciesBuilderError :: Initialization {
456
- message : "Cannot create Memory adapter for SingleSignatureStore."
457
- . to_string ( ) ,
458
- error : Some ( e. into ( ) ) ,
459
- }
460
- } ) ?;
461
- Box :: new ( adapter)
462
- }
463
- } ;
464
-
465
- Ok ( Arc :: new ( SingleSignatureStore :: new (
466
- adapter,
467
- self . configuration . store_retention_limit ,
468
- ) ) )
469
- }
470
-
471
- /// Get a configured [SingleSignatureStore].
472
- pub async fn get_single_signature_store ( & mut self ) -> Result < Arc < SingleSignatureStore > > {
473
- if self . single_signature_store . is_none ( ) {
474
- self . single_signature_store = Some ( self . build_single_signature_store ( ) . await ?) ;
475
- }
476
-
477
- Ok ( self . single_signature_store . as_ref ( ) . cloned ( ) . unwrap ( ) )
478
- }
479
-
480
433
async fn build_protocol_parameters_store ( & mut self ) -> Result < Arc < ProtocolParametersStore > > {
481
434
Ok ( Arc :: new ( ProtocolParametersStore :: new (
482
435
Box :: new ( EpochSettingStore :: new ( self . get_sqlite_connection ( ) . await ?) ) ,
@@ -965,7 +918,6 @@ impl DependenciesBuilder {
965
918
certificate_pending_store : self . get_certificate_pending_store ( ) . await ?,
966
919
certificate_store : self . get_certificate_store ( ) . await ?,
967
920
verification_key_store : self . get_verification_key_store ( ) . await ?,
968
- single_signature_store : self . get_single_signature_store ( ) . await ?,
969
921
protocol_parameters_store : self . get_protocol_parameters_store ( ) . await ?,
970
922
chain_observer : self . get_chain_observer ( ) . await ?,
971
923
beacon_provider : self . get_beacon_provider ( ) . await ?,
0 commit comments