mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Some clean ups on the sync package (#13636)
This commit is contained in:
parent
04dd60d1bf
commit
24b029bbef
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -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")
|
||||
)
|
||||
|
@ -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{{}}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user