remove go-wire and go-crypto deps

This commit is contained in:
Ethan Buchman
2018-02-03 02:39:34 -05:00
parent 21dd648732
commit 1148027baf
7 changed files with 59 additions and 41 deletions
+1 -2
View File
@@ -2,14 +2,13 @@ package dummy
import (
"github.com/tendermint/abci/types"
crypto "github.com/tendermint/go-crypto"
cmn "github.com/tendermint/tmlibs/common"
)
// RandVal creates one random validator, with a key derived
// from the input value
func RandVal(i int) types.Validator {
pubkey := crypto.GenPrivKeyEd25519FromSecret([]byte(cmn.Fmt("test%d", i))).PubKey().Bytes()
pubkey := cmn.RandBytes(33)
power := cmn.RandUint16() + 1
return types.Validator{pubkey, int64(power)}
}
+2 -3
View File
@@ -9,7 +9,6 @@ import (
"github.com/tendermint/abci/example/code"
"github.com/tendermint/abci/types"
crypto "github.com/tendermint/go-crypto"
cmn "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tmlibs/log"
@@ -158,12 +157,12 @@ func (app *PersistentDummyApplication) execValidatorTx(tx []byte) types.Response
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Pubkey (%s) is invalid hex", pubkeyS)}
}
_, err = crypto.PubKeyFromBytes(pubkey)
/*_, err = crypto.PubKeyFromBytes(pubkey)
if err != nil {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Pubkey (%X) is invalid go-crypto encoded", pubkey)}
}
}*/
// decode the power
power, err := strconv.ParseInt(powerS, 10, 64)