Commit ac94fe0f authored by jiangpeng's avatar jiangpeng

udpate chain33 crypto register

parent 4b5cd0a0
......@@ -223,7 +223,7 @@ const Name = "auth_ecdsa"
const ID = 257
func init() {
crypto.Register(Name, &Driver{})
crypto.Register(Name, &Driver{}, false)
crypto.RegisterType(Name, ID)
}
......
......@@ -17,6 +17,6 @@ const name = "auth_sm2"
const id = 258
func init() {
crypto.Register(name, &sm2Driver{})
crypto.Register(name, &sm2Driver{}, false)
crypto.RegisterType(name, id)
}
......@@ -16,7 +16,7 @@ import (
type oneTimeEd25519 struct{}
func init() {
crypto.Register(privacytypes.SignNameOnetimeED25519, &oneTimeEd25519{})
crypto.Register(privacytypes.SignNameOnetimeED25519, &oneTimeEd25519{}, false)
}
func (onetime *oneTimeEd25519) GenKey() (crypto.PrivKey, error) {
......
......@@ -21,7 +21,7 @@ import (
)
func init() {
crypto.Register(privacytypes.SignNameRing, &RingSignED25519{})
crypto.Register(privacytypes.SignNameRing, &RingSignED25519{}, false)
crypto.RegisterType(privacytypes.SignNameRing, privacytypes.RingBaseonED25519)
}
......
......@@ -149,11 +149,11 @@ func (mock *testDataMock) importPrivateKey(PrivKey *types.ReqWalletImportPrivkey
return
}
pub, err := bipwallet.PrivkeyToPub(cointype, privkeybyte)
pub, err := bipwallet.PrivkeyToPub(cointype, uint32(signType), privkeybyte)
if err != nil {
return
}
addr, err := bipwallet.PubToAddress(cointype, pub)
addr, err := bipwallet.PubToAddress(pub)
if err != nil {
return
}
......
......@@ -278,3 +278,8 @@ func (_m *walletOperateMock) WaitTx(hash []byte) *types.TransactionDetail {
func (_m *walletOperateMock) WaitTxs(hashes [][]byte) []*types.TransactionDetail {
return nil
}
// GetCoinType provides a mock function with given fields:
func (_m *walletOperateMock) GetCoinType() uint32 {
return 0
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment