Skip to content

Commit

Permalink
Remove TODOs and move into issue #424
Browse files Browse the repository at this point in the history
  • Loading branch information
jonastheis committed Oct 11, 2023
1 parent 91c6998 commit 0023f71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions pkg/testsuite/mock/blockissuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ var (
ErrBlockTooRecent = ierrors.New("block is too recent compared to latest commitment")
)

// TODO: make sure an honest validator does not issue blocks within the same slot ratification period in two conflicting chains.
// - this can be achieved by remembering the last issued block together with the engine name/chain.
// - if the engine name/chain is the same we can always issue a block.
// - if the engine name/chain is different we need to make sure to wait "slot ratification" slots.

// BlockIssuer contains logic to create and issue blocks signed by the given account.
type BlockIssuer struct {
Testing *testing.T
Expand Down Expand Up @@ -117,7 +112,6 @@ func (i *BlockIssuer) CreateValidationBlock(ctx context.Context, alias string, i
}

if blockParams.BlockHeader.References == nil {
// TODO: change this to get references for validator block
references, err := i.getReferences(ctx, nil, node, blockParams.BlockHeader.ParentsCount)
require.NoError(i.Testing, err)

Expand Down Expand Up @@ -403,7 +397,6 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco
case *iotago.ValidationBlock:
//nolint:revive,staticcheck //temporarily disable
if len(iotaBlock.Parents()) == 0 {
// TODO: implement tipselection for validator blocks
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/testsuite/testsuite_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func WithSnapshotOptions(snapshotOptions ...options.Option[snapshotcreator.Optio

func WithProtocolParametersOptions(protocolParameterOptions ...options.Option[iotago.V3ProtocolParameters]) options.Option[TestSuite] {
return func(t *TestSuite) {
t.optsProtocolParameterOptions = protocolParameterOptions
t.ProtocolParameterOptions = protocolParameterOptions
}
}

Expand Down

0 comments on commit 0023f71

Please sign in to comment.