From 762fe8960b35252e751cf79685a42569c2eaf31e Mon Sep 17 00:00:00 2001 From: Andrea V <1577639+karimodm@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:42:31 +0200 Subject: [PATCH] Fix: nil pointer API dereference --- pkg/model/block.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/model/block.go b/pkg/model/block.go index 404847121..bc5e604fd 100644 --- a/pkg/model/block.go +++ b/pkg/model/block.go @@ -9,8 +9,6 @@ import ( ) type Block struct { - api iotago.API - blockID iotago.BlockID data []byte @@ -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) }