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
6 changed files with 7 additions and 14 deletions

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{})