prysm-pulse/slasher/db/schema.go

25 lines
772 B
Go
Raw Normal View History

package db
import (
"github.com/prysmaticlabs/prysm/shared/bytesutil"
)
var (
// Slasher
2019-10-19 03:35:09 +00:00
historicIndexedAttestationsBucket = []byte("historic-indexed-attestations-bucket")
historicBlockHeadersBucket = []byte("historic-block-headers-bucket")
indexedAttestationsIndicesBucket = []byte("indexed-attestations-indices-bucket")
)
func encodeEpochValidatorID(epoch uint64, validatorID uint64) []byte {
return append(bytesutil.Bytes8(epoch), bytesutil.Bytes8(validatorID)...)
}
func encodeEpochValidatorIDSig(epoch uint64, validatorID uint64, sig []byte) []byte {
return append(append(bytesutil.Bytes8(epoch), bytesutil.Bytes8(validatorID)...), sig...)
}
2019-10-19 03:35:09 +00:00
func encodeEpochSig(epoch uint64, sig []byte) []byte {
return append(bytesutil.Bytes8(epoch), sig...)
}