make byzantine logic testable

This commit is contained in:
Ethan Buchman
2016-11-15 18:45:36 -05:00
parent f837252ff1
commit 57da2e4af5
6 changed files with 270 additions and 39 deletions
+5
View File
@@ -163,6 +163,10 @@ func (privVal *PrivValidator) Reset() {
privVal.Save()
}
func (privVal *PrivValidator) GetAddress() []byte {
return privVal.Address
}
func (privVal *PrivValidator) SignVote(chainID string, vote *Vote) error {
privVal.mtx.Lock()
defer privVal.mtx.Unlock()
@@ -231,6 +235,7 @@ func (privVal *PrivValidator) signBytesHRS(height, round int, step int8, signByt
privVal.save()
return signature, nil
}
func (privVal *PrivValidator) String() string {