mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
whisper/whisperv5: gofmt -w -s
This commit is contained in:
parent
2d0c32149d
commit
55e87184e7
5 changed files with 14 additions and 16 deletions
|
|
@ -25,5 +25,3 @@ var DefaultConfig = Config{
|
|||
MaxMessageSize: DefaultMaxMessageSize,
|
||||
MinimumAcceptedPOW: DefaultMinimumPoW,
|
||||
}
|
||||
|
||||
var ()
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func (fs *Filters) Install(watcher *Filter) (string, error) {
|
|||
}
|
||||
|
||||
if watcher.expectsSymmetricEncryption() {
|
||||
watcher.SymKeyHash = crypto.Keccak256Hash(watcher.KeySym);
|
||||
watcher.SymKeyHash = crypto.Keccak256Hash(watcher.KeySym)
|
||||
}
|
||||
|
||||
fs.watchers[id] = watcher
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ func TestInstallSymKeyGeneratesHash(t *testing.T) {
|
|||
_, err := filters.Install(filter)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error installing the filter: %s", err);
|
||||
t.Fatalf("Error installing the filter: %s", err)
|
||||
}
|
||||
|
||||
for i, b := range filter.SymKeyHash {
|
||||
|
|
@ -174,30 +174,30 @@ func TestInstallIdenticalFilters(t *testing.T) {
|
|||
PoW: filter1.PoW,
|
||||
AllowP2P: filter1.AllowP2P,
|
||||
Messages: make(map[common.Hash]*ReceivedMessage),
|
||||
};
|
||||
}
|
||||
|
||||
_, err := filters.Install(filter1)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error installing the first filter with seed %d: %s", seed, err);
|
||||
t.Fatalf("Error installing the first filter with seed %d: %s", seed, err)
|
||||
}
|
||||
|
||||
_, err = filters.Install(filter2)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error installing the second filter with seed %d: %s", seed, err);
|
||||
t.Fatalf("Error installing the second filter with seed %d: %s", seed, err)
|
||||
}
|
||||
|
||||
params, err := generateMessageParams()
|
||||
if err != nil {
|
||||
t.Fatalf("Error generating message parameters with seed %d: %s", seed, err);
|
||||
t.Fatalf("Error generating message parameters with seed %d: %s", seed, err)
|
||||
}
|
||||
|
||||
params.KeySym = filter1.KeySym
|
||||
params.Topic = BytesToTopic(filter1.Topics[0])
|
||||
|
||||
filter1.Src = ¶ms.Src.PublicKey;
|
||||
filter2.Src = ¶ms.Src.PublicKey;
|
||||
filter1.Src = ¶ms.Src.PublicKey
|
||||
filter2.Src = ¶ms.Src.PublicKey
|
||||
|
||||
sentMessage, err := NewSentMessage(params)
|
||||
if err != nil {
|
||||
|
|
@ -212,19 +212,19 @@ func TestInstallIdenticalFilters(t *testing.T) {
|
|||
t.Fatalf("failed to Open with filter1")
|
||||
}
|
||||
|
||||
if ! filter1.MatchEnvelope(env) {
|
||||
if !filter1.MatchEnvelope(env) {
|
||||
t.Fatalf("failed matching with the first filter")
|
||||
}
|
||||
|
||||
if ! filter2.MatchEnvelope(env) {
|
||||
if !filter2.MatchEnvelope(env) {
|
||||
t.Fatalf("failed matching with the first filter")
|
||||
}
|
||||
|
||||
if ! filter1.MatchMessage(msg) {
|
||||
if !filter1.MatchMessage(msg) {
|
||||
t.Fatalf("failed matching with the second filter")
|
||||
}
|
||||
|
||||
if ! filter2.MatchMessage(msg) {
|
||||
if !filter2.MatchMessage(msg) {
|
||||
t.Fatalf("failed matching with the second filter")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ func TestSymmetricSendCycle(t *testing.T) {
|
|||
PoW: filter1.PoW,
|
||||
AllowP2P: filter1.AllowP2P,
|
||||
Messages: make(map[common.Hash]*ReceivedMessage),
|
||||
};
|
||||
}
|
||||
|
||||
params, err := generateMessageParams()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue