The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/node/double_signing.go

28 lines
693 B

package node
import (
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/internal/utils"
"github.com/harmony-one/harmony/staking/slash"
)
// ProcessSlashCandidateMessage ..
func (node *Node) processSlashCandidateMessage(msgPayload []byte) {
if !node.IsRunningBeaconChain() {
return
}
candidates := slash.Records{}
if err := rlp.DecodeBytes(msgPayload, &candidates); err != nil {
utils.Logger().Error().
Err(err).Msg("unable to decode slash candidates message")
return
}
if err := node.Blockchain().AddPendingSlashingCandidates(
candidates,
); err != nil {
utils.Logger().Error().
Err(err).Msg("unable to add slash candidates to pending ")
}
}