From 9ff75eb38eb3daf47e4f151b74b7d59a56a2164c Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 6 Mar 2024 16:53:44 -0500 Subject: [PATCH] chore: remove peer-sharing Signed-off-by: Chris Gianelloni --- .gitignore | 1 - cmd/peer-sharing/main.go | 58 ---------------------------------------- 2 files changed, 59 deletions(-) delete mode 100644 cmd/peer-sharing/main.go diff --git a/.gitignore b/.gitignore index f1bc8e1b..396a79b8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ *.so *.dylib /gouroboros -/peer-sharing /tx-submission # Test binary, built with `go test -c` diff --git a/cmd/peer-sharing/main.go b/cmd/peer-sharing/main.go deleted file mode 100644 index 333c3f71..00000000 --- a/cmd/peer-sharing/main.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2023 Blink Labs Software -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "os" - - ouroboros "github.com/blinklabs-io/gouroboros" - "github.com/blinklabs-io/gouroboros/cmd/common" -) - -func main() { - // Parse commandline - f := common.NewGlobalFlags() - f.Parse() - // Create connection - conn := common.CreateClientConnection(f) - errorChan := make(chan error) - go func() { - for { - err := <-errorChan - fmt.Printf("ERROR(async): %s\n", err) - os.Exit(1) - } - }() - o, err := ouroboros.New( - ouroboros.WithConnection(conn), - ouroboros.WithNetworkMagic(uint32(f.NetworkMagic)), - ouroboros.WithErrorChan(errorChan), - ouroboros.WithNodeToNode(f.NtnProto), - ouroboros.WithKeepAlive(true), - ) - if err != nil { - fmt.Printf("ERROR: %s\n", err) - os.Exit(1) - } - - peers, err := o.PeerSharing().Client.GetPeers(10) - if err != nil { - fmt.Printf("ERROR: %s\n", err) - os.Exit(1) - } - - fmt.Printf("peers = %#v\n", peers) -}