上个commit不够对,actorAddress 是在 packMe 中被赋值的,不需要提前检测。

This commit is contained in:
Luk Lu
2020-02-28 12:24:35 +08:00
parent 61318e8940
commit 9099da4ab9
2 changed files with 5 additions and 7 deletions

View File

@@ -13,10 +13,8 @@ MOM.__proto__ = Action.prototype
MOM.validateMe = function () {
// if (sender && sender.type !== 'multisig' && action.toAddress != action.actorAddress && sender.balance >= action.amount + action.fee){
return this.actorAddress && this.actorPubkey && ticCrypto.pubkey2address(this.actorPubkey)=== this.actorAddress // 必须检查发起人地址和公钥是匹配的,否则客户端能够造假
&& this.toAddress && this.toAddress != this.actorAddress
&& this.amount && this.amount > 0 && (this.fee >= 0)
return this.actorPubkey && this.toAddress && ticCrypto.pubkey2address(this.actorPubkey)!== this.toAddress // 不能转帐给自己。
&& this.amount && this.amount > 0 && (this.fee >= 0)
}
MOM.executableMe = async function() {