Update core. Output blockchain height and version in 'peer list' output.

This commit is contained in:
Kleissner
2021-12-03 15:35:23 +01:00
parent d397e4818d
commit a7ee9929ac
4 changed files with 6 additions and 5 deletions

View File

@@ -95,7 +95,7 @@ func userCommands(input io.Reader, output io.Writer, terminateSignal chan struct
}
userAgent := strings.ToValidUTF8(peer.UserAgent, "?")
fmt.Fprintf(output, "* Peer ID %s%s\n Node ID %s\n User Agent: %s\n\n%s\n Packets sent: %d\n Packets received: %d\n\n", hex.EncodeToString(peer.PublicKey.SerializeCompressed()), info, hex.EncodeToString(peer.NodeID), userAgent, textPeerConnections(peer), peer.StatsPacketSent, peer.StatsPacketReceived)
fmt.Fprintf(output, "* Peer ID %s%s\n Node ID %s\n User Agent: %s\n Blockchain: height %d, version %d\n\n%s\n Packets sent: %d\n Packets received: %d\n\n", hex.EncodeToString(peer.PublicKey.SerializeCompressed()), info, hex.EncodeToString(peer.NodeID), userAgent, peer.BlockchainHeight, peer.BlockchainVersion, textPeerConnections(peer), peer.StatsPacketSent, peer.StatsPacketReceived)
}
case "chat all", "chat":

View File

@@ -13,6 +13,7 @@ import (
"time"
"github.com/PeernetOfficial/core"
"github.com/PeernetOfficial/core/protocol"
"github.com/PeernetOfficial/core/udt"
"github.com/PeernetOfficial/core/warehouse"
)
@@ -47,7 +48,7 @@ func transferCompareFile(peer *core.PeerInfo, fileHash []byte) {
fmt.Printf("2. Opened UDT connection for file: %s\n", hex.EncodeToString(fileHash))
fileSize, transferSize, err := core.FileTransferReadHeaderUDT(udtConn)
fileSize, transferSize, err := protocol.FileTransferReadHeader(udtConn)
if err != nil {
fmt.Printf("Error reading file transfer header: %s\n", err)
return

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/PeernetOfficial/Cmd
go 1.16
require (
github.com/PeernetOfficial/core v0.0.0-20211129165122-e648f80e3180
github.com/PeernetOfficial/core v0.0.0-20211130025319-68d8c1187273
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.4.3-0.20210424162022-e8629af678b7
)

4
go.sum
View File

@@ -1,5 +1,5 @@
github.com/PeernetOfficial/core v0.0.0-20211129165122-e648f80e3180 h1:iCDKnPbpdbALk9fqUVP6pcqZe6g6NU/J16XYqN+5ULo=
github.com/PeernetOfficial/core v0.0.0-20211129165122-e648f80e3180/go.mod h1:0D/jIDYdV0WXg5WACS+fR5keafLhYB89WUs6ZEE8t4Y=
github.com/PeernetOfficial/core v0.0.0-20211130025319-68d8c1187273 h1:WZKBtdXfNBxy06Dyf+aPXsA+0fIBwNNGD7O5FnmiIVo=
github.com/PeernetOfficial/core v0.0.0-20211130025319-68d8c1187273/go.mod h1:0D/jIDYdV0WXg5WACS+fR5keafLhYB89WUs6ZEE8t4Y=
github.com/akrylysov/pogreb v0.10.1 h1:FqlR8VR7uCbJdfUob916tPM+idpKgeESDXOA1K0DK4w=
github.com/akrylysov/pogreb v0.10.1/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YTWyqJZ7+lI=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=