fixed small inconsistency with sqlite3 (#8054)

This commit is contained in:
Giulio rebuffo 2023-08-23 22:44:22 +02:00 committed by GitHub
parent 83d767c861
commit db4533acd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ func ReadParentBlockRoot(ctx context.Context, db SQLObject, blockRoot libcommon.
var parentRoot libcommon.Hash
// Execute the query.
err := db.QueryRowContext(ctx, "SELECT parent_block_root FROM beacon_indicies WHERE beacon_block_root = ?", blockRoot[:]).Scan(parentRoot[:])
err := db.QueryRowContext(ctx, "SELECT parent_block_root FROM beacon_indicies WHERE beacon_block_root = ?", blockRoot[:]).Scan(&parentRoot)
if err != nil {
if err == sql.ErrNoRows {
return libcommon.Hash{}, nil