@@ -403,11 +403,7 @@ func (node *AlgorandFullNode) Start() {
403
403
404
404
// startMonitoringRoutines starts the internal monitoring routines used by the node.
405
405
func (node * AlgorandFullNode ) startMonitoringRoutines () {
406
- node .monitoringRoutinesWaitGroup .Add (3 )
407
-
408
- // PKI TODO: Remove this with #2596
409
- // Periodically check for new participation keys
410
- go node .checkForParticipationKeys (node .ctx .Done ())
406
+ node .monitoringRoutinesWaitGroup .Add (2 )
411
407
412
408
go node .txPoolGaugeThread (node .ctx .Done ())
413
409
// Delete old participation keys
@@ -781,24 +777,6 @@ func ensureParticipationDB(genesisDir string, log logging.Logger) (account.Parti
781
777
return account .MakeParticipationRegistry (accessor , log )
782
778
}
783
779
784
- // Reload participation keys from disk periodically
785
- func (node * AlgorandFullNode ) checkForParticipationKeys (done <- chan struct {}) {
786
- defer node .monitoringRoutinesWaitGroup .Done ()
787
- ticker := time .NewTicker (node .config .ParticipationKeysRefreshInterval )
788
- for {
789
- select {
790
- case <- ticker .C :
791
- err := node .loadParticipationKeys ()
792
- if err != nil {
793
- node .log .Errorf ("Could not refresh participation keys: %v" , err )
794
- }
795
- case <- done :
796
- ticker .Stop ()
797
- return
798
- }
799
- }
800
- }
801
-
802
780
// ListParticipationKeys returns all participation keys currently installed on the node
803
781
func (node * AlgorandFullNode ) ListParticipationKeys () (partKeys []account.ParticipationRecord , err error ) {
804
782
return node .accountManager .Registry ().GetAll (), nil
@@ -942,19 +920,6 @@ func (node *AlgorandFullNode) InstallParticipationKey(partKeyBinary []byte) (acc
942
920
return account.ParticipationID {}, err
943
921
}
944
922
945
- newFilename := config .PartKeyFilename (partkey .ID ().String (), uint64 (partkey .FirstValid ), uint64 (partkey .LastValid ))
946
- newFullyQualifiedFilename := filepath .Join (outDir , filepath .Base (newFilename ))
947
-
948
- if _ , err = os .Stat (newFullyQualifiedFilename ); os .IsExist (err ) {
949
- return account.ParticipationID {}, fmt .Errorf ("KeyInstallation: cannot register duplicate participation key" )
950
- }
951
-
952
- err = os .Rename (fullyQualifiedTempFile , newFullyQualifiedFilename )
953
-
954
- if err != nil {
955
- return account.ParticipationID {}, nil
956
- }
957
-
958
923
return partkey .ID (), nil
959
924
}
960
925
0 commit comments