Skip to content

Commit

Permalink
Check if block exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed May 17, 2024
1 parent 59b643f commit db3299f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions collector/sql/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func (c *Client) GetLayer(db *sql.Database, lid types.LayerID, numLayers uint32)
layer := types.NewExistingLayer(lid, blts, blks)

for _, b := range layer.Blocks() {
if b == nil {
continue
}
mtxs, missing := getMeshTransactions(db, b.TxIDs)
if len(missing) != 0 {
return nil, status.Errorf(codes.Internal, "error retrieving tx data")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/spacemeshos/address v0.0.0-20220829090052-44ab32617871
github.com/spacemeshos/api/release/go v1.37.0
github.com/spacemeshos/go-scale v1.2.0
github.com/spacemeshos/go-spacemesh v1.5.2-hotfix1
github.com/spacemeshos/go-spacemesh v1.5.3
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.1
go.mongodb.org/mongo-driver v1.10.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ github.com/spacemeshos/fixed v0.1.1 h1:N1y4SUpq1EV+IdJrWJwUCt1oBFzeru/VKVcBsvPc2
github.com/spacemeshos/fixed v0.1.1/go.mod h1:B/moObha9wGnwljZP+w/dYAwzv097aL9VV8Oyv2cM/E=
github.com/spacemeshos/go-scale v1.2.0 h1:ZlA2L1ILym2gmyJUwUdLTiyP1ZIG0U4xE9nFVFLi83M=
github.com/spacemeshos/go-scale v1.2.0/go.mod h1:HV6e3/X5h9u2aFpYKJxt7PY/fBuLBegEKWgeZJ+/5jE=
github.com/spacemeshos/go-spacemesh v1.5.2-hotfix1 h1:olMmES1BgbkHJpkZbjKHRpb7NdDfzIYGShXrNbhpmNs=
github.com/spacemeshos/go-spacemesh v1.5.2-hotfix1/go.mod h1:agJTs0XXtFUJgsz0mVV+oNHRILvwjiL4AzuB9z+L0zI=
github.com/spacemeshos/go-spacemesh v1.5.3 h1:jOJuTIhkDKNkwu+kJnmypudO7aN9gjPEbBOsazSKtng=
github.com/spacemeshos/go-spacemesh v1.5.3/go.mod h1:agJTs0XXtFUJgsz0mVV+oNHRILvwjiL4AzuB9z+L0zI=
github.com/spacemeshos/merkle-tree v0.2.3 h1:zGEgOR9nxAzJr0EWjD39QFngwFEOxfxMloEJZtAysas=
github.com/spacemeshos/merkle-tree v0.2.3/go.mod h1:VomOcQ5pCBXz7goiWMP5hReyqOfDXGSKbrH2GB9Htww=
github.com/spacemeshos/poet v0.10.2 h1:FVb0xgCFcjZyIGBQ92SlOZVx4KCmlCRRL4JSHL6LMGU=
Expand Down

0 comments on commit db3299f

Please sign in to comment.