上个commit不够对,actorAddress 是在 packMe 中被赋值的,不需要提前检测。
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user