fix cases for incomplete transactions
This commit is contained in:
parent
740256772e
commit
e85431861e
3 changed files with 20 additions and 3 deletions
|
|
@ -57,13 +57,13 @@ TxProposal.fromObj = function(o) {
|
|||
|
||||
|
||||
TxProposal.prototype.isValid = function() {
|
||||
if (this.builder.signhash !== Transaction.SIGHASH_ALL) {
|
||||
if (this.builder.signhash && 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) {
|
||||
if (hashType && hashType !== Transaction.SIGHASH_ALL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue