Finished TODO cleanup (#553)

This commit is contained in:
Raul Jordan 2018-09-21 22:36:38 -05:00 committed by GitHub
parent 419cff2512
commit 5c0ee65619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 14 deletions

View File

@ -91,7 +91,7 @@ func (ss *Service) Start() {
}
if !stored {
// TODO: Resume sync after completion of initial sync.
// TODO(#426): Resume sync after completion of initial sync.
// Currently, `Simulator` only supports sync from genesis block, therefore
// new nodes with a fresh database must skip InitialSync and immediately run the Sync goroutine.
log.Info("Empty chain state, but continue sync")
@ -226,7 +226,6 @@ func (ss *Service) handleBlockRequestBySlot(msg p2p.Message) {
defer blockRequestSpan.End()
request, ok := msg.Data.(*pb.BeaconBlockRequestBySlotNumber)
// TODO: Handle this at p2p layer.
if !ok {
log.Error("Received malformed beacon block request p2p message")
return

View File

@ -58,13 +58,11 @@ func (s *KVStore) Delete(k []byte) error {
// Close satisfies ethdb.Database.
func (s *KVStore) Close() {
//TODO: Implement Close for KVStore
log.Debug("ShardKV Close() isnt implemented yet")
}
// NewBatch satisfies ethdb.Database.
func (s *KVStore) NewBatch() ethdb.Batch {
//TODO: Implement NewBatch for KVStore
log.Debug("ShardKV NewBatch() isnt implemented yet")
return nil
}

View File

@ -104,8 +104,6 @@ func TestLifecycle(t *testing.T) {
t.Error("ProcessedAttestationFeed empty")
}
b.Start()
// TODO: find a better way to test this. The problem is that start is non-blocking, and it ends
// before the for loops of its inner goroutines begin.
time.Sleep(time.Millisecond * 10)
testutil.AssertLogsContain(t, hook, "Starting service")
b.Stop()

View File

@ -150,7 +150,7 @@ func (s *ShardEthereum) registerP2P(ctx *cli.Context) 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(161): 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

@ -108,14 +108,14 @@ func (p *Proposer) AddPendingAttestation(attestation *pbp2p.AggregatedAttestatio
// AggregateAllSignatures aggregates all the signatures of the attesters. This is currently a
// stub for now till BLS/other signature schemes are implemented.
func (p *Proposer) AggregateAllSignatures(attestations []*pbp2p.AggregatedAttestation) []uint32 {
// TODO: Implement Signature Aggregation.
// TODO(#258): Implement Signature Aggregation.
return []uint32{}
}
// GenerateBitmask creates the attestation bitmask from all the attester bitfields in the
// attestation records.
func (p *Proposer) GenerateBitmask(attestations []*pbp2p.AggregatedAttestation) []byte {
// TODO: Implement bitmask where all attesters bitfields are aggregated.
// TODO(#258): Implement bitmask where all attesters bitfields are aggregated.
return []byte{}
}
@ -170,10 +170,10 @@ func (p *Proposer) run(done <-chan struct{}, client pb.ProposerServiceClient) {
agSig := p.AggregateAllSignatures(p.pendingAttestation)
bitmask := p.GenerateBitmask(p.pendingAttestation)
// TODO: Implement real proposals with randao reveals and attestation fields.
// TODO(#552): Implement real proposals with randao reveals and attestation fields.
req := &pb.ProposeRequest{
ParentHash: latestBlockHash[:],
// TODO: Fix to be the actual, timebased slot number instead.
// TODO(#511): Fix to be the actual, timebased slot number instead.
SlotNumber: latestBeaconBlock.GetSlotNumber() + 1,
RandaoReveal: []byte{},
AttestationBitmask: bitmask,

View File

@ -31,9 +31,7 @@ func TestCollation_Transactions(t *testing.T) {
}
}
//TODO: Add test for converting *gethTypes.Transaction into raw blobs
//Tests that Transactions can be serialised
// Tests that Transactions can be serialised
func TestSerialize_Deserialize(t *testing.T) {
header := NewCollationHeader(big.NewInt(1), nil, big.NewInt(1), nil, [32]byte{})