mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
whisper: run gofmt to quell linter
This commit is contained in:
parent
226eccdab0
commit
81f2b79428
3 changed files with 14 additions and 16 deletions
|
|
@ -759,7 +759,6 @@ func requestExpiredMessagesLoop() {
|
||||||
fmt.Println("Error: topic is invalid, request aborted")
|
fmt.Println("Error: topic is invalid, request aborted")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if timeUpp == 0 {
|
if timeUpp == 0 {
|
||||||
timeUpp = 0xFFFFFFFF
|
timeUpp = 0xFFFFFFFF
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,12 @@
|
||||||
package whisperv6
|
package whisperv6
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"github.com/ethereum/go-ethereum/log"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/ethereum/go-ethereum/log"
|
||||||
|
"io"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/p2p"
|
"github.com/ethereum/go-ethereum/p2p"
|
||||||
|
|
@ -30,11 +30,11 @@ import (
|
||||||
host "github.com/libp2p/go-libp2p-host"
|
host "github.com/libp2p/go-libp2p-host"
|
||||||
inet "github.com/libp2p/go-libp2p-net"
|
inet "github.com/libp2p/go-libp2p-net"
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
peer "github.com/libp2p/go-libp2p-peer"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
|
||||||
set "gopkg.in/fatih/set.v0"
|
|
||||||
pstore "github.com/libp2p/go-libp2p-peerstore"
|
pstore "github.com/libp2p/go-libp2p-peerstore"
|
||||||
swarm "github.com/libp2p/go-libp2p-swarm"
|
swarm "github.com/libp2p/go-libp2p-swarm"
|
||||||
"github.com/libp2p/go-libp2p/p2p/host/basic"
|
"github.com/libp2p/go-libp2p/p2p/host/basic"
|
||||||
|
ma "github.com/multiformats/go-multiaddr"
|
||||||
|
set "gopkg.in/fatih/set.v0"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LibP2PStream is a wrapper used to implement the MsgReadWriter
|
// LibP2PStream is a wrapper used to implement the MsgReadWriter
|
||||||
|
|
@ -183,7 +183,6 @@ func (server *LibP2PWhisperServer) connectToPeer(p *LibP2PPeer) error {
|
||||||
p.connectionStream = &lps
|
p.connectionStream = &lps
|
||||||
p.ws = p.connectionStream
|
p.ws = p.connectionStream
|
||||||
|
|
||||||
|
|
||||||
// TODO send my known list of peers
|
// TODO send my known list of peers
|
||||||
|
|
||||||
// Call HandlePeer to perform the handshake
|
// Call HandlePeer to perform the handshake
|
||||||
|
|
@ -194,7 +193,7 @@ func (server *LibP2PWhisperServer) connectToPeer(p *LibP2PPeer) error {
|
||||||
|
|
||||||
// Start starts the server
|
// Start starts the server
|
||||||
func (server *LibP2PWhisperServer) Start() error {
|
func (server *LibP2PWhisperServer) Start() error {
|
||||||
server.Host.SetStreamHandler(WhisperProtocolString, func (stream inet.Stream) {
|
server.Host.SetStreamHandler(WhisperProtocolString, func(stream inet.Stream) {
|
||||||
log.Info("opening stream from new peer")
|
log.Info("opening stream from new peer")
|
||||||
|
|
||||||
pid := stream.Conn().RemotePeer()
|
pid := stream.Conn().RemotePeer()
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
package whisperv6
|
package whisperv6
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue