add validation for actual tx SIGHASH_TYPE
This commit is contained in:
parent
b5c144d48c
commit
76e0d8f5ef
2 changed files with 61 additions and 0 deletions
|
|
@ -60,6 +60,13 @@ TxProposal.prototype.isValid = function() {
|
|||
if (this.builder.signhash !== Transaction.SIGHASH_ALL) {
|
||||
return false;
|
||||
}
|
||||
var tx = this.builder.build();
|
||||
for (var i = 0; i < tx.ins.length; i++) {
|
||||
var hashType = tx.getHashType(i);
|
||||
if (hashType !== Transaction.SIGHASH_ALL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue