Skip to content

Commit

Permalink
Fix: addressed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Mar 15, 2024
1 parent 6983411 commit 0fc0325
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/testsuite/testsuite_issue_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (t *TestSuite) assertParentsExistFromBlockOptions(blockOpts []options.Optio
t.AssertBlocksExist(t.Blocks(lo.Map(parents, func(id iotago.BlockID) string { return id.Alias() })...), true, node)
}

func (t *TestSuite) referenceDependencies(blockOpts []options.Option[mock.BlockHeaderParams], inputTxName string, blockName string) []options.Option[mock.BlockHeaderParams] {
func (t *TestSuite) addReferenceToDependencies(blockOpts []options.Option[mock.BlockHeaderParams], inputTxName string) []options.Option[mock.BlockHeaderParams] {
if inputTxName != "Genesis" {
if attachments, exists := t.attachments.Get(inputTxName); !exists {
panic(fmt.Sprintf("input transaction %s does not have an attachment", inputTxName))
Expand Down Expand Up @@ -89,7 +89,7 @@ func (t *TestSuite) registerBlock(blockName string, block *blocks.Block) {
block.ID().RegisterAlias(blockName)

if tx, hasTransaction := block.SignedTransaction(); hasTransaction {
t.attachments.Compute(lo.Return1(tx.Transaction.ID()).Alias(), func(currentValue []*blocks.Block, exists bool) []*blocks.Block {
t.attachments.Compute(lo.Return1(tx.Transaction.ID()).Alias(), func(currentValue []*blocks.Block, _ bool) []*blocks.Block {
if currentValue == nil {
currentValue = make([]*blocks.Block, 0)
}
Expand Down Expand Up @@ -208,7 +208,7 @@ func (t *TestSuite) issueBlockRow(prefix string, row int, parentsPrefix string,
tx := t.DefaultWallet().CreateBasicOutputsEquallyFromInput(txName, 1, inputName)

issuingOptionsCopy[node.Name] = t.limitParentsCountInBlockOptions(issuingOptionsCopy[node.Name], iotago.BasicBlockMaxParents)
issuingOptionsCopy[node.Name] = t.referenceDependencies(issuingOptionsCopy[node.Name], inputTxName, blockName)
issuingOptionsCopy[node.Name] = t.addReferenceToDependencies(issuingOptionsCopy[node.Name], inputTxName)
t.assertParentsCommitmentExistFromBlockOptions(issuingOptionsCopy[node.Name], node)
t.assertParentsExistFromBlockOptions(issuingOptionsCopy[node.Name], node)

Expand Down

0 comments on commit 0fc0325

Please sign in to comment.