rename ticc.sign/verify/encrypt/decrypt/hash to ticc.xxx_easy
This commit is contained in:
@@ -19,7 +19,7 @@ MOM.signMe = async function (seckey) {
|
||||
let json = this.getJson({
|
||||
exclude: ['hash', 'blockHash', 'actorSignature', 'json']
|
||||
}) // 是前端用户发起事务时签字,这时候还不知道进入哪个区块,所以不能计入blockHash
|
||||
this.actorSignature = await ticc.sign(json, seckey)
|
||||
this.actorSignature = await ticc.sign_easy({ data: json, seckey })
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ MOM.verifySig = async function () {
|
||||
let json = this.getJson({
|
||||
exclude: ['hash', 'blockHash', 'actorSignature', 'json']
|
||||
})
|
||||
let res = await ticc.verify({
|
||||
let res = await ticc.verify_easy({
|
||||
data: json,
|
||||
signature: this.actorSignature,
|
||||
pubkey: this.actorPubkey
|
||||
@@ -42,7 +42,7 @@ MOM.verifyAddress = function () {
|
||||
}
|
||||
|
||||
MOM.hashMe = function () {
|
||||
this.hash = ticc.hash(
|
||||
this.hash = ticc.hash_easy(
|
||||
this.getJson({ exclude: ['hash', 'blockHash', 'json'] })
|
||||
) // block.hash 受到所包含的actionList影响,所以action不能受blockHash影响,否则循环了
|
||||
return this
|
||||
@@ -51,7 +51,7 @@ MOM.hashMe = function () {
|
||||
MOM.verifyHash = function () {
|
||||
return (
|
||||
this.hash ===
|
||||
ticc.hash(this.getJson({ exclude: ['hash', 'blockHash', 'json'] }))
|
||||
ticc.hash_easy(this.getJson({ exclude: ['hash', 'blockHash', 'json'] }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,11 @@ MOM.checkMultiSig = async function (account) {
|
||||
// 该交易内已签名的每一个公钥
|
||||
if (
|
||||
account.multiSignatures.keysgroup.indexOf(i) !== -1 &&
|
||||
(await ticc.verify(json, this.json[i], i))
|
||||
(await ticc.verify_easy({
|
||||
data: json,
|
||||
signature: this.json[i],
|
||||
pubkey: i
|
||||
}))
|
||||
) {
|
||||
M++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user