mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
* Handle blind block for DB * Update blinded_beacon_block_bellatrix_test.go * Update blocks_test.go Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
26 lines
593 B
Go
26 lines
593 B
Go
package kv
|
|
|
|
import "bytes"
|
|
|
|
// In order for an encoding to be Altair compatible, it must be prefixed with altair key.
|
|
func hasAltairKey(enc []byte) bool {
|
|
if len(altairKey) >= len(enc) {
|
|
return false
|
|
}
|
|
return bytes.Equal(enc[:len(altairKey)], altairKey)
|
|
}
|
|
|
|
func hasBellatrixKey(enc []byte) bool {
|
|
if len(bellatrixKey) >= len(enc) {
|
|
return false
|
|
}
|
|
return bytes.Equal(enc[:len(bellatrixKey)], bellatrixKey)
|
|
}
|
|
|
|
func hasBellatrixBlindKey(enc []byte) bool {
|
|
if len(bellatrixBlindKey) >= len(enc) {
|
|
return false
|
|
}
|
|
return bytes.Equal(enc[:len(bellatrixBlindKey)], bellatrixBlindKey)
|
|
}
|