mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
b32c19a004
* first version of the watchtower api * first commit * remove watchtower * working version * fix < 0 * gaz * Update slasher/db/db.go * remove clear history * moved constant to config * gaz * feedback changes * compare uint64 * add constant config * PruneSlasherStoragePeriod change
20 lines
561 B
Go
20 lines
561 B
Go
package db
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
|
)
|
|
|
|
var (
|
|
// Slasher
|
|
historicAttestationsBucket = []byte("historic-attestations-bucket")
|
|
historicBlockHeadersBucket = []byte("historic-block-headers-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...)
|
|
}
|