fix signature for nreq>2
This commit is contained in:
parent
7d608c254f
commit
cf2e13fc62
3 changed files with 24 additions and 9 deletions
|
|
@ -80,6 +80,7 @@ describe('TxProposal', function() {
|
|||
amountSatStr: '123',
|
||||
}]),
|
||||
};
|
||||
builder.inputsSigned =0;
|
||||
|
||||
return builder;
|
||||
};
|
||||
|
|
@ -338,6 +339,7 @@ describe('TxProposal', function() {
|
|||
sigs[0][1].should.equal(SIG1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#addSignature', function() {
|
||||
it('should add signatures maintaing pubkeys order', function() {
|
||||
var txp = dummyProposal({
|
||||
|
|
@ -353,8 +355,13 @@ describe('TxProposal', function() {
|
|||
keysSorted.should.deep.equal(keys);
|
||||
|
||||
});
|
||||
|
||||
|
||||
it('should add signatures to incomplete txs ', function() {
|
||||
var txp = dummyProposal({
|
||||
nsig:1
|
||||
});
|
||||
txp.addSignature('pepe', [SIG1]);
|
||||
txp.builder.inputsSigned.should.be.equal(0);
|
||||
});
|
||||
|
||||
it('should fail with invalid signatures', function() {
|
||||
var txp = dummyProposal({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue