mtx: fix verify methods.
This commit is contained in:
parent
c732333554
commit
7932a25abe
@ -260,7 +260,14 @@ MTX.prototype.check = function check(flags) {
|
||||
*/
|
||||
|
||||
MTX.prototype.verify = function verify(flags) {
|
||||
return TX.prototype.verify.call(this, this.view, flags);
|
||||
try {
|
||||
this.check(flags);
|
||||
} catch (e) {
|
||||
if (e.type === 'ScriptError')
|
||||
return false;
|
||||
throw e;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -382,7 +389,8 @@ MTX.prototype.getSigopsSize = function getSigopsSize() {
|
||||
*/
|
||||
|
||||
MTX.prototype.verifyInputs = function verifyInputs(height) {
|
||||
return TX.prototype.verifyInputs.call(this, this.view, height);
|
||||
let [fee] = this.checkInputs(height);
|
||||
return fee !== -1;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user