Skip to content

Commit

Permalink
Fix: nil pointer API dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
karimodm committed Sep 27, 2023
1 parent d6c86c8 commit 762fe89
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/model/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
)

type Block struct {
api iotago.API

blockID iotago.BlockID

data []byte
Expand Down Expand Up @@ -107,7 +105,7 @@ func (blk *Block) ValidationBlock() (validationBlock *iotago.ValidationBlock, is
}

func (blk *Block) String() string {
encode, err := blk.api.JSONEncode(blk.ProtocolBlock())
encode, err := blk.protocolBlock.API.JSONEncode(blk.ProtocolBlock())
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 762fe89

Please sign in to comment.