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.
 
 
 
 
 
 

26 lines
583 B

package consensus
import (
. "github.com/tendermint/tendermint/blocks"
db_ "github.com/tendermint/tendermint/db"
"github.com/tendermint/tendermint/state"
)
//-----------------------------------------------------------------------------
type PrivValidator struct {
state.PrivAccount
db *db_.LevelDB
}
// Double signing results in a panic.
func (pv *PrivValidator) Sign(o Signable) {
switch o.(type) {
case *Proposal:
//TODO: prevent double signing.
pv.PrivAccount.Sign(o.(*Proposal))
case *Vote:
//TODO: prevent double signing.
pv.PrivAccount.Sign(o.(*Vote))
}
}