diff --git a/p2p/kademlia/store/sqlite/sqlite.go b/p2p/kademlia/store/sqlite/sqlite.go index cf57bbd25..a9e23bdf7 100644 --- a/p2p/kademlia/store/sqlite/sqlite.go +++ b/p2p/kademlia/store/sqlite/sqlite.go @@ -157,8 +157,6 @@ func NewStore(ctx context.Context, dataDir string, _ time.Duration, _ time.Durat } } - log.WithContext(ctx).Info("p2p database successfully opened") - s.db = db dbFilePath = dbFile @@ -172,7 +170,7 @@ func NewStore(ctx context.Context, dataDir string, _ time.Duration, _ time.Durat return nil, fmt.Errorf("cannot create meta store: %w", err) } } - log.WithContext(ctx).Info("p2p database started") + return s, nil } @@ -440,7 +438,6 @@ func (s *Store) Retrieve(_ context.Context, key []byte) ([]byte, error) { PostAccessUpdate([]string{hkey}) } - fmt.Println("Data from local store") if len(r.Data) > 0 { return r.Data, nil } diff --git a/walletnode/cmd/app.go b/walletnode/cmd/app.go index f79571c54..2c00d7e1a 100644 --- a/walletnode/cmd/app.go +++ b/walletnode/cmd/app.go @@ -8,10 +8,7 @@ import ( "path/filepath" "sync" - "github.com/pastelnetwork/gonode/common/storage/rqstore" "github.com/pastelnetwork/gonode/common/storage/ticketstore" - "github.com/pastelnetwork/gonode/p2p" - "github.com/pastelnetwork/gonode/p2p/kademlia/store/cloud.go" "github.com/pastelnetwork/gonode/common/cli" "github.com/pastelnetwork/gonode/common/configurer" @@ -276,19 +273,6 @@ func runApp(ctx context.Context, config *configs.Config) error { scoreService := score.NewScoreService(pastelClient) healthCheckChallengeService := healthcheckchallenge.NewHealthCheckChallengeService(pastelClient) - rqstore, err := rqstore.NewSQLiteRQStore(filepath.Join(defaultPath, "rqstore.db")) - if err != nil { - return errors.Errorf("could not create rqstore, %w", err) - } - defer rqstore.Close() - - // p2p service (currently using kademlia) - cloudStorage := cloud.NewRcloneStorage("bucket", "spec") - _, err = p2p.New(ctx, &p2p.Config{DataDir: "/home/matee/.pastel/p2pdata"}, pastelClient, nil, rqstore, cloudStorage) - if err != nil { - return errors.Errorf("could not create p2p service, %w", err) - } - fileMappings := &sync.Map{} server := api.NewAPIServer(config.API, fileMappings, pastelClient, services.NewNftAPIHandler(apiSrcvConf, fileMappings, nftRegister, nftSearch, nftDownload), diff --git a/walletnode/go.mod b/walletnode/go.mod index b8ea5e4ce..112d37fb8 100644 --- a/walletnode/go.mod +++ b/walletnode/go.mod @@ -19,7 +19,6 @@ require ( github.com/json-iterator/go v1.1.12 github.com/pastelnetwork/gonode/common v0.0.0-20240229105633-1f295fe18563 github.com/pastelnetwork/gonode/mixins v0.0.0-00010101000000-000000000000 - github.com/pastelnetwork/gonode/p2p v0.0.0-00010101000000-000000000000 github.com/pastelnetwork/gonode/pastel v0.0.0-00010101000000-000000000000 github.com/pastelnetwork/gonode/proto v0.0.0-00010101000000-000000000000 github.com/pastelnetwork/gonode/raptorq v0.0.0-00010101000000-000000000000