Clean Up Todos and Add in Issue Checker (#640)

This commit is contained in:
Nishant Das 2018-10-12 02:52:09 +08:00 committed by Raul Jordan
parent 26cad3f9c1
commit c67a084b55
6 changed files with 15 additions and 8 deletions

View File

@ -74,8 +74,6 @@ func NewChainService(ctx context.Context, cfg *Config) (*ChainService, error) {
// Start a blockchain service's main event loop.
func (c *ChainService) Start() {
// TODO(#474): Fetch the slot: (block, state) DAGs from persistent storage
// to truly continue across sessions.
log.Info("Starting service")
var err error

View File

@ -27,7 +27,6 @@ var (
simulatedBlockKey = []byte("last-simulated-block")
// Data item suffixes.
// TODO(#514): Change suffixes back to prefixes as originally designed after issue 514 is solved or after BoltDB migration
blockSuffix = []byte("-block") // blockhash + blockPrefix -> block
canonicalSuffix = []byte("-canonical") // num(uint64 big endian) + cannoicalSuffix -> blockhash
attestationSuffix = []byte("-attestation") // attestationHash + attestationSuffix -> attestation

View File

@ -245,7 +245,6 @@ func (c *CrystallizedState) isDynastyTransition(slotNumber uint64) bool {
func (c *CrystallizedState) getAttesterIndices(attestation *pb.AggregatedAttestation) ([]uint32, error) {
slotsStart := c.LastStateRecalculationSlot() - params.GetConfig().CycleLength
slotIndex := (attestation.Slot - slotsStart) % params.GetConfig().CycleLength
// TODO(#267): ShardAndCommitteesForSlots will return default value because the spec for dynasty transition is not finalized.
shardCommitteeArray := c.data.ShardAndCommitteesForSlots
shardCommittee := shardCommitteeArray[slotIndex].ArrayShardAndCommittee
for i := 0; i < len(shardCommittee); i++ {
@ -312,7 +311,6 @@ func (c *CrystallizedState) NewStateRecalculations(aState *ActiveState, block *B
blockVoteBalance = 0
}
// TODO(#542): This should have been total balance of the validators in the slot committee.
if 3*blockVoteBalance >= 2*c.TotalDeposits() {
if slot > justifiedSlot {
justifiedSlot = slot

View File

@ -8,3 +8,17 @@ then
echo "$OUTPUT" >&2;
exit 1;
fi
while read -r line ; do
linenum=`expr $line : '^\([0-9]*:\)'`
issueNum=${line//$linenum}
issueState=$(curl https://api.github.com/repos/prysmaticlabs/prysm/issues/$issueNum | grep -o '"state":"closed"');
if [ "$issueState" != "" ];
then
echo "Issue referenced has already been closed" >&2;
echo "Issue Number: $issueNum" >&2;
exit 1;
fi
done < <(grep -PrinH -o -h '(?<!context\.)todo\(#{0,1}\K(\d+)' --include \*.go *)

View File

@ -173,7 +173,6 @@ func (s *Server) Send(msg proto.Message, peer Peer) {
// Broadcast a message to the world.
func (s *Server) Broadcast(msg proto.Message) {
// TODO(#176): https://github.com/prysmaticlabs/prysm/issues/176
topic := s.topicMapping[messageType(msg)]
log.WithFields(logrus.Fields{
"topic": topic,

View File

@ -168,8 +168,7 @@ func (p *Proposer) run(done <-chan struct{}, client pb.ProposerServiceClient) {
p.lock.Lock()
bitmask := p.GenerateBitmask(p.pendingAttestation)
// TODO(#552): Implement real proposals with randao reveals and attestation fields.
// TODO(#619): Implement real proposals with randao reveals and attestation fields.
req := &pb.ProposeRequest{
ParentHash: latestBlockHash[:],
// TODO(#511): Fix to be the actual, timebased slot number instead.