Compare commits

...

2 Commits

Author SHA1 Message Date
Preston Van Loon
c0993f69bf Testing 2024-02-21 08:49:59 -06:00
terence
24b029bbef Some clean ups on the sync package (#13636) 2024-02-20 21:32:13 +00:00
4 changed files with 8 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ func testBlocksWithKeys(t *testing.T, nBlocks uint64, nBlobs int, vr []byte) ([]
func TestVerify(t *testing.T) {
vr := make([]byte, 32)
copy(vr, []byte("yooooo"))
copy(vr, "yooooo")
blks, _, _, pks := testBlocksWithKeys(t, 2, 0, vr)
pubkeys := make([][fieldparams.BLSPubkeyLength]byte, len(pks))
for i := range pks {

View File

@@ -151,14 +151,14 @@ func newBlockBatch(start, reqEnd primitives.Slot, size uint64) (blockBatch, bool
return nb, true
}
func (bat blockBatch) next(reqEnd primitives.Slot, size uint64) (blockBatch, bool) {
if bat.error() != nil {
return bat, false
func (bb blockBatch) next(reqEnd primitives.Slot, size uint64) (blockBatch, bool) {
if bb.error() != nil {
return bb, false
}
if bat.nonLinear() {
if bb.nonLinear() {
return blockBatch{}, false
}
return newBlockBatch(bat.end.Add(1), reqEnd, size)
return newBlockBatch(bb.end.Add(1), reqEnd, size)
}
// blocks returns the list of linear, canonical blocks read from the db.

View File

@@ -15,7 +15,7 @@ var (
// ErrBatchSignatureMismatch is returned by VerifiedROBlobs when any of the blobs in the batch have a signature
// which does not match the signature for the block with a corresponding root.
ErrBatchSignatureMismatch = errors.New("Sidecar block header signature does not match signed block")
// ErrBlockRootMismatch is returned by VerifiedROBlobs in the scenario where the root of the given signed block
// ErrBatchBlockRootMismatch is returned by VerifiedROBlobs in the scenario where the root of the given signed block
// does not match the block header in one of the corresponding sidecars.
ErrBatchBlockRootMismatch = errors.New("Sidecar block header root does not match signed block")
)

View File

@@ -54,7 +54,7 @@ func TestBlobAlignsWithBlock(t *testing.T) {
require.NoError(t, err)
rob, err := blocks.NewROBlock(blk)
require.NoError(t, err)
return rob, []blocks.ROBlob{blocks.ROBlob{}}
return rob, []blocks.ROBlob{{}}
},
},
}