Browse Source

fixes from review

pull/1667/head
Ethan Buchman 6 years ago
parent
commit
54e61468d4
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      state/execution.go
  2. +2
    -2
      types/protobuf.go

+ 1
- 1
state/execution.go View File

@ -258,7 +258,7 @@ func getBeginBlockValidatorInfo(block *types.Block, lastValSet *types.ValidatorS
// `SetValidatorSet()` and `ToABCI` methods ? // `SetValidatorSet()` and `ToABCI` methods ?
valset, err := LoadValidators(stateDB, ev.Height()) valset, err := LoadValidators(stateDB, ev.Height())
if err != nil { if err != nil {
panic(err) // shoudn't happen
panic(err) // shouldn't happen
} }
byzVals[i] = types.TM2PB.Evidence(ev, valset, block.Time) byzVals[i] = types.TM2PB.Evidence(ev, valset, block.Time)
} }


+ 2
- 2
types/protobuf.go View File

@ -52,12 +52,12 @@ func (tm2pb) PubKey(pubKey crypto.PubKey) abci.PubKey {
switch pk := pubKey.(type) { switch pk := pubKey.(type) {
case crypto.PubKeyEd25519: case crypto.PubKeyEd25519:
return abci.PubKey{ return abci.PubKey{
Type: "ed25519",
Type: ABCIPubKeyTypeEd25519,
Data: pk[:], Data: pk[:],
} }
case crypto.PubKeySecp256k1: case crypto.PubKeySecp256k1:
return abci.PubKey{ return abci.PubKey{
Type: "secp256k1",
Type: ABCIPubKeyTypeSecp256k1,
Data: pk[:], Data: pk[:],
} }
default: default:


Loading…
Cancel
Save