mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Ran code cleanup from goland (#6064)
* Ran code cleanup from goland * Typo
This commit is contained in:
parent
49a0d3caf0
commit
6e3b78b99e
@ -18,7 +18,7 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
messagediff "gopkg.in/d4l3k/messagediff.v1"
|
||||
"gopkg.in/d4l3k/messagediff.v1"
|
||||
)
|
||||
|
||||
func TestFilterBoundaryCandidates_FilterCorrect(t *testing.T) {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
ssz "github.com/prysmaticlabs/go-ssz"
|
||||
"github.com/prysmaticlabs/go-ssz"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache"
|
||||
b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
|
||||
|
@ -18,10 +18,10 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/logutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli/v2/altsrc"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
)
|
||||
|
||||
var appFlags = []cli.Flag{
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/golang/snappy"
|
||||
errors "github.com/pkg/errors"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/go-ssz"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
)
|
||||
|
@ -10,10 +10,10 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
multiaddr "github.com/multiformats/go-multiaddr"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed"
|
||||
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
pubsub "github.com/libp2p/go-libp2p-pubsub"
|
||||
swarmt "github.com/libp2p/go-libp2p-swarm/testing"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/encoder"
|
||||
peers "github.com/prysmaticlabs/prysm/beacon-chain/p2p/peers"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/peers"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
"github.com/patrickmn/go-cache"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/go-bitfield"
|
||||
@ -14,18 +12,20 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed"
|
||||
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
||||
dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations"
|
||||
p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
|
||||
mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing"
|
||||
"github.com/prysmaticlabs/prysm/shared/featureconfig"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
||||
func TestService_committeeIndexBeaconAttestationSubscriber_ValidMessage(t *testing.T) {
|
||||
t.Skip("Temporarily disabled, fixed in v0.12 branch.")
|
||||
|
||||
|
||||
p := p2ptest.NewTestP2P(t)
|
||||
resetCfg := featureconfig.InitWithReset(&featureconfig.Flags{DisableDynamicCommitteeSubnets: true})
|
||||
defer resetCfg()
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
bls "github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
bls "github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
bls "github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
bls "github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
bls "github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
)
|
||||
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/slasher/db/types"
|
||||
"gopkg.in/d4l3k/messagediff.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
"gopkg.in/d4l3k/messagediff.v1"
|
||||
)
|
||||
|
||||
func TestStore_ProposerSlashingNilBucket(t *testing.T) {
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/shared/featureconfig"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
db "github.com/prysmaticlabs/prysm/slasher/db"
|
||||
"github.com/prysmaticlabs/prysm/slasher/db"
|
||||
"github.com/prysmaticlabs/prysm/slasher/detection/attestations/iface"
|
||||
"github.com/prysmaticlabs/prysm/slasher/detection/attestations/types"
|
||||
"go.opencensus.io/trace"
|
||||
|
@ -17,9 +17,9 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/slasher/flags"
|
||||
"github.com/prysmaticlabs/prysm/slasher/node"
|
||||
"github.com/sirupsen/logrus"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli/v2/altsrc"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
)
|
||||
|
||||
var log = logrus.WithField("prefix", "main")
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
host "github.com/libp2p/go-libp2p-host"
|
||||
dhtpb "github.com/libp2p/go-libp2p-kad-dht/pb"
|
||||
net "github.com/libp2p/go-libp2p-net"
|
||||
p2p "github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
||||
)
|
||||
|
||||
const dhtProtocol = "/prysm/0.0.0/dht"
|
||||
|
@ -30,7 +30,7 @@ import (
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
dsync "github.com/ipfs/go-datastore/sync"
|
||||
logging "github.com/ipfs/go-log"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p-core/crypto"
|
||||
kaddht "github.com/libp2p/go-libp2p-kad-dht"
|
||||
dhtopts "github.com/libp2p/go-libp2p-kad-dht/opts"
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
"github.com/urfave/cli/v2"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
k8s "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
@ -199,7 +199,7 @@ func updateKubernetesConfigMap(ctx context.Context, contractAddr string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cm, err := client.CoreV1().ConfigMaps("beacon-chain").Get(ctx,"beacon-config", metav1.GetOptions{})
|
||||
cm, err := client.CoreV1().ConfigMaps("beacon-chain").Get(ctx, "beacon-config", metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
"github.com/urfave/cli/v2"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
recaptcha "github.com/prestonvanloon/go-recaptcha"
|
||||
"github.com/prestonvanloon/go-recaptcha"
|
||||
faucetpb "github.com/prysmaticlabs/prysm/proto/faucet"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
"google.golang.org/grpc"
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
recaptcha "github.com/prestonvanloon/go-recaptcha"
|
||||
"github.com/prestonvanloon/go-recaptcha"
|
||||
faucetpb "github.com/prysmaticlabs/prysm/proto/faucet"
|
||||
"github.com/prysmaticlabs/prysm/shared/roughtime"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
keygen "github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
"github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -16,9 +16,9 @@ import (
|
||||
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
"gopkg.in/d4l3k/messagediff.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -14,10 +14,10 @@ import (
|
||||
"fmt"
|
||||
|
||||
logging "github.com/ipfs/go-log"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p"
|
||||
circuit "github.com/libp2p/go-libp2p-circuit"
|
||||
crypto "github.com/libp2p/go-libp2p-crypto"
|
||||
multiaddr "github.com/multiformats/go-multiaddr"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
)
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
"github.com/urfave/cli/v2"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -2,11 +2,11 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/shared/interop"
|
||||
"github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -66,4 +66,3 @@ func generateUnencryptedKeys(startIndex uint64) *keygen.UnencryptedKeysContainer
|
||||
}
|
||||
return ctnr
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,10 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen"
|
||||
)
|
||||
|
||||
func TestSavesUnencryptedKeys(t *testing.T) {
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/prysmaticlabs/prysm/validator/node"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli/v2/altsrc"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
"google.golang.org/grpc"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli/v2/altsrc"
|
||||
)
|
||||
|
||||
var log = logrus.WithField("prefix", "main")
|
||||
|
Loading…
Reference in New Issue
Block a user