format and cleanup some TODOs (#544)

This commit is contained in:
Preston Van Loon
2018-09-20 00:14:31 -04:00
committed by terence tsao
parent b4e57489af
commit 75d32588e0
10 changed files with 12 additions and 13 deletions

View File

@@ -26,7 +26,8 @@ func configureP2P() (*p2p.Server, error) {
return nil, err
}
// TODO(437, 438): Define default adapters for logging, monitoring, etc.
// TODO(437): Define default adapters for logging, monitoring, etc.
// TODO(438): Define default adapters for logging, monitoring, etc.
var adapters []p2p.Adapter
for k, v := range topicMappings {
s.RegisterTopic(k.String(), v, adapters...)

View File

@@ -331,9 +331,6 @@ func MigrateFlags(action func(ctx *cli.Context) error) func(*cli.Context) error
// Setup initializes profiling based on the CLI flags.
// It should be called as early as possible in the program.
func Setup(ctx *cli.Context) error {
// TODO: Set verbosity level from flag.
log.SetLevel(log.DebugLevel)
// profiling, tracing
runtime.MemProfileRate = ctx.GlobalInt(MemProfileRateFlag.Name)
if traceFile := ctx.GlobalString(TraceFlag.Name); traceFile != "" {

View File

@@ -21,7 +21,7 @@ var mDNSTag = mdns.ServiceTag
// startDiscovery protocols. Currently, this supports discovery via multicast
// DNS peer discovery.
//
// TODO: add other discovery protocols such as DHT, etc.
// TODO(287): add other discovery protocols such as DHT, etc.
func startDiscovery(ctx context.Context, host host.Host) error {
mdnsService, err := mdns.NewMdnsService(ctx, host, discoveryInterval, mDNSTag)
if err != nil {

View File

@@ -15,7 +15,7 @@ var port int32 = 9000
var portRange int32 = 100
// buildOptions for the libp2p host.
// TODO: Expand on these options and provide the option configuration via flags.
// TODO(287): Expand on these options and provide the option configuration via flags.
// Currently, this is a random port and a (seemingly) consistent private key
// identity.
func buildOptions() []libp2p.Option {

View File

@@ -8,8 +8,7 @@
//
// This communication is abstracted through the Feed, Broadcast, and Send.
//
// Pub/sub topic has a specific message type that is used for that topic. The
// mappings for these topics are outlined here: (TODO).
// Pub/sub topic has a specific message type that is used for that topic.
//
// Read more about gossipsub at https://github.com/vyzo/gerbil-simsub
package p2p

View File

@@ -1,6 +1,6 @@
package p2p
// Peer TODO: - Design and implement.
// Peer TODO(175): - Design and implement.
// See design doc: https://docs.google.com/document/d/1cthKuGPreOSQH96Ujt7sArcT-IRICk6b-QcdD0EnLsI/edit
// https://github.com/prysmaticlabs/prysm/issues/175
type Peer struct{}

View File

@@ -42,5 +42,4 @@ func ExampleServer_RegisterTopic() {
ch := make(chan p2p.Message)
sub := s.Subscribe(message, ch)
defer sub.Unsubscribe()
// TODO: Show more of how the chan is used.
}

View File

@@ -45,7 +45,7 @@ func TestBroadcast(t *testing.T) {
msg := &shardpb.CollationBodyRequest{}
s.Broadcast(msg)
// TODO: test that topic was published
// TODO(543): test that topic was published
}
func TestEmitFailsNonProtobuf(t *testing.T) {
@@ -197,6 +197,7 @@ func testSubscribe(ctx context.Context, t *testing.T, s Server, gsub *floodsub.P
}
func TestRegisterTopic_WithoutAdapters(t *testing.T) {
// TODO(488): Unskip this test
t.Skip("Currently failing to simulate incoming p2p messages. See github.com/prysmaticlabs/prysm/issues/488")
s, err := NewServer()
if err != nil {
@@ -237,6 +238,7 @@ func TestRegisterTopic_WithoutAdapters(t *testing.T) {
}
func TestRegisterTopic_WithAdapters(t *testing.T) {
// TODO(488): Unskip this test
t.Skip("Currently failing to simulate incoming p2p messages. See github.com/prysmaticlabs/prysm/issues/488")
s, err := NewServer()
if err != nil {

View File

@@ -148,7 +148,7 @@ func (s *ShardEthereum) registerP2P() error {
// can spin up a transaction pool that will relay incoming transactions via an
// event feed. For our first releases, this can just relay test/fake transaction data
// the proposer can serialize into collation blobs.
// TODO: design this txpool system for our first release.
// TODO(161): design this txpool system for our first release.
func (s *ShardEthereum) registerTXPool() error {
var shardp2p *p2p.Server
if err := s.services.FetchService(&shardp2p); err != nil {

View File

@@ -19,7 +19,8 @@ func configureP2P() (*p2p.Server, error) {
return nil, err
}
// TODO(437, 438): Define default adapters for logging, monitoring, etc.
// TODO(437): Define default adapters for logging, monitoring, etc.
// TODO(438): Define default adapters for logging, monitoring, etc.
var adapters []p2p.Adapter
for k, v := range topicMappings {
s.RegisterTopic(k.String(), v, adapters...)