Skip to content

Commit ffcda0d

Browse files
committed
chore: update TODO comments with issues
1 parent e62503b commit ffcda0d

19 files changed

+61
-86
lines changed

connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func (c *Connection) setupConnection() error {
314314
c.networkMagic,
315315
handshakeDiffusionMode,
316316
c.peerSharingEnabled,
317-
// TODO: make this configurable
317+
// TODO: make this configurable (#373)
318318
protocol.QueryModeDisabled,
319319
)
320320
// Perform handshake

ledger/alonzo/pparams.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (p *AlonzoProtocolParameters) UpdateFromGenesis(genesis *AlonzoGenesis) {
9292
StepPrice: &cbor.Rat{Rat: genesis.ExecutionPrices.Steps.Rat},
9393
}
9494
}
95-
// TODO: cost models
95+
// TODO: cost models (#852)
9696
// We have 150+ string values to map to array indexes
9797
// CostModels map[string]map[string]int
9898
}

ledger/block.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ func NewBlockFromCbor(blockType uint, data []byte) (Block, error) {
4646
return nil, fmt.Errorf("unknown node-to-client block type: %d", blockType)
4747
}
4848

49-
// XXX: should this take the block header type instead?
5049
func NewBlockHeaderFromCbor(blockType uint, data []byte) (BlockHeader, error) {
5150
switch blockType {
5251
case BlockTypeByronEbb:
5352
return NewByronEpochBoundaryBlockHeaderFromCbor(data)
5453
case BlockTypeByronMain:
5554
return NewByronMainBlockHeaderFromCbor(data)
56-
// TODO: break into separate cases and parse as specific block header types
55+
// TODO: break into separate cases and parse as specific block header types (#844)
5756
case BlockTypeShelley, BlockTypeAllegra, BlockTypeMary, BlockTypeAlonzo:
5857
return NewShelleyBlockHeaderFromCbor(data)
5958
case BlockTypeBabbage, BlockTypeConway:

ledger/byron/byron.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,11 @@ type ByronUpdateProposalBlockVersionMod struct {
473473
type ByronMainBlockBody struct {
474474
cbor.StructAsArray
475475
cbor.DecodeStoreCbor
476-
// TODO: split this to its own type
476+
// TODO: split this to its own type (#853)
477477
TxPayload []struct {
478478
cbor.StructAsArray
479479
Transaction ByronTransaction
480-
// TODO: figure out what this field actually is
480+
// TODO: properly decode TX witnesses (#853)
481481
Twit []cbor.Value
482482
}
483483
SscPayload cbor.Value

ledger/common/address.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func (a Address) Bytes() []byte {
362362
}
363363
rawPayload, err := cbor.Encode(tmpPayload)
364364
if err != nil {
365-
// TODO: handle error
365+
// TODO: handle error (#851)
366366
return nil
367367
}
368368
tmpData := []any{
@@ -374,7 +374,7 @@ func (a Address) Bytes() []byte {
374374
}
375375
ret, err := cbor.Encode(tmpData)
376376
if err != nil {
377-
// TODO: handle error
377+
// TODO: handle error (#851)
378378
return nil
379379
}
380380
return ret

ledger/common/certs.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ func (c *RegistrationCertificate) UnmarshalCBOR(
516516
}
517517

518518
func (c *RegistrationCertificate) Utxorpc() *utxorpc.Certificate {
519-
// TODO
519+
// TODO (#850)
520520
return nil
521521
}
522522

@@ -537,7 +537,7 @@ func (c *DeregistrationCertificate) UnmarshalCBOR(
537537
}
538538

539539
func (c *DeregistrationCertificate) Utxorpc() *utxorpc.Certificate {
540-
// TODO
540+
// TODO (#850)
541541
return nil
542542
}
543543

@@ -558,7 +558,7 @@ func (c *VoteDelegationCertificate) UnmarshalCBOR(
558558
}
559559

560560
func (c *VoteDelegationCertificate) Utxorpc() *utxorpc.Certificate {
561-
// TODO
561+
// TODO (#850)
562562
return nil
563563
}
564564

@@ -580,7 +580,7 @@ func (c *StakeVoteDelegationCertificate) UnmarshalCBOR(
580580
}
581581

582582
func (c *StakeVoteDelegationCertificate) Utxorpc() *utxorpc.Certificate {
583-
// TODO
583+
// TODO (#850)
584584
return nil
585585
}
586586

@@ -602,7 +602,7 @@ func (c *StakeRegistrationDelegationCertificate) UnmarshalCBOR(
602602
}
603603

604604
func (c *StakeRegistrationDelegationCertificate) Utxorpc() *utxorpc.Certificate {
605-
// TODO
605+
// TODO (#850)
606606
return nil
607607
}
608608

@@ -624,7 +624,7 @@ func (c *VoteRegistrationDelegationCertificate) UnmarshalCBOR(
624624
}
625625

626626
func (c *VoteRegistrationDelegationCertificate) Utxorpc() *utxorpc.Certificate {
627-
// TODO
627+
// TODO (#850)
628628
return nil
629629
}
630630

@@ -647,7 +647,7 @@ func (c *StakeVoteRegistrationDelegationCertificate) UnmarshalCBOR(
647647
}
648648

649649
func (c *StakeVoteRegistrationDelegationCertificate) Utxorpc() *utxorpc.Certificate {
650-
// TODO
650+
// TODO (#850)
651651
return nil
652652
}
653653

@@ -668,7 +668,7 @@ func (c *AuthCommitteeHotCertificate) UnmarshalCBOR(
668668
}
669669

670670
func (c *AuthCommitteeHotCertificate) Utxorpc() *utxorpc.Certificate {
671-
// TODO
671+
// TODO (#850)
672672
return nil
673673
}
674674

@@ -689,7 +689,7 @@ func (c *ResignCommitteeColdCertificate) UnmarshalCBOR(
689689
}
690690

691691
func (c *ResignCommitteeColdCertificate) Utxorpc() *utxorpc.Certificate {
692-
// TODO
692+
// TODO (#850)
693693
return nil
694694
}
695695

@@ -711,7 +711,7 @@ func (c *RegistrationDrepCertificate) UnmarshalCBOR(
711711
}
712712

713713
func (c *RegistrationDrepCertificate) Utxorpc() *utxorpc.Certificate {
714-
// TODO
714+
// TODO (#850)
715715
return nil
716716
}
717717

@@ -732,7 +732,7 @@ func (c *DeregistrationDrepCertificate) UnmarshalCBOR(
732732
}
733733

734734
func (c *DeregistrationDrepCertificate) Utxorpc() *utxorpc.Certificate {
735-
// TODO
735+
// TODO (#850)
736736
return nil
737737
}
738738

@@ -753,6 +753,6 @@ func (c *UpdateDrepCertificate) UnmarshalCBOR(
753753
}
754754

755755
func (c *UpdateDrepCertificate) Utxorpc() *utxorpc.Certificate {
756-
// TODO
756+
// TODO (#850)
757757
return nil
758758
}

ledger/error.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func (e *UtxoFailure) UnmarshalCBOR(data []byte) error {
295295
}
296296

297297
func (e *UtxoFailure) Error() string {
298-
// TODO: lookup era name programmatically
298+
// TODO: lookup era name programmatically (#846)
299299
return fmt.Sprintf("UtxoFailure (FromAlonzoUtxoFail (%s))", e.Err)
300300
}
301301

@@ -528,7 +528,7 @@ func (e *InsufficientCollateral) Error() string {
528528

529529
type ScriptsNotPaidUtxo struct {
530530
UtxoFailureErrorBase
531-
// TODO: determine content/structure of this value
531+
// TODO: determine content/structure of this value (#847)
532532
Value cbor.Value
533533
}
534534

@@ -552,7 +552,7 @@ func (e *ExUnitsTooBigUtxo) Error() string {
552552

553553
type CollateralContainsNonADA struct {
554554
UtxoFailureErrorBase
555-
// TODO: determine content/structure of this value
555+
// TODO: determine content/structure of this value (#848)
556556
Value cbor.Value
557557
}
558558

ledger/shelley/pparams.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ func (p *ShelleyProtocolParameters) UpdateFromGenesis(genesis *ShelleyGenesis) {
129129
p.ProtocolMajor = genesisParams.ProtocolVersion.Major
130130
p.ProtocolMinor = genesisParams.ProtocolVersion.Minor
131131
p.MinUtxoValue = genesisParams.MinUtxoValue
132-
// TODO:
133-
//p.Nonce *cbor.Rat
134132
}
135133

136134
type ShelleyProtocolParameterUpdate struct {

ledger/tx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func NewTransactionBodyFromCbor(
7373
// NewTransactionOutputFromCbor attempts to parse the provided arbitrary CBOR data as a transaction output from
7474
// each of the eras, returning the first one that we can successfully decode
7575
func NewTransactionOutputFromCbor(data []byte) (TransactionOutput, error) {
76-
// TODO: add Byron transaction output support
76+
// TODO: add Byron transaction output support (#849)
7777
if txOut, err := NewShelleyTransactionOutputFromCbor(data); err == nil {
7878
return txOut, nil
7979
}
@@ -90,7 +90,7 @@ func NewTransactionOutputFromCbor(data []byte) (TransactionOutput, error) {
9090
}
9191

9292
func DetermineTransactionType(data []byte) (uint, error) {
93-
// TODO: uncomment this once the following issue is resolved:
93+
// TODO: uncomment this once the following issue is resolved: (#849)
9494
// https://github.com/blinklabs-io/gouroboros/issues/206
9595
/*
9696
if _, err := NewByronTransactionFromCbor(data); err == nil {

ledger/verify_kes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (s Sum0KesSig) Verify(
123123
return ed25519.Verify(pubKey, msg, s)
124124
}
125125

126-
// TODO: make this work on anything from Shelley onward
126+
// TODO: make this work on anything from Shelley onward (#845)
127127
func VerifyKes(
128128
header *BabbageBlockHeader,
129129
slotsPerKesPeriod uint64,

0 commit comments

Comments
 (0)