weird -> anyone can spend
This commit is contained in:
parent
eae1638b32
commit
a7fdcc13a0
@ -120,8 +120,8 @@ describe('Transaction', function() {
|
|||||||
script: Script.buildPublicKeyHashOut(fromAddress).toString(),
|
script: Script.buildPublicKeyHashOut(fromAddress).toString(),
|
||||||
satoshis: 100000
|
satoshis: 100000
|
||||||
};
|
};
|
||||||
var weirdUtxoWith100000Satoshis = JSON.parse(JSON.stringify(simpleUtxoWith100000Satoshis));
|
var anyoneCanSpendUTXO = JSON.parse(JSON.stringify(simpleUtxoWith100000Satoshis));
|
||||||
weirdUtxoWith100000Satoshis.script = new Script().add('OP_TRUE');
|
anyoneCanSpendUTXO.script = new Script().add('OP_TRUE');
|
||||||
var toAddress = 'mrU9pEmAx26HcbKVrABvgL7AwA5fjNFoDc';
|
var toAddress = 'mrU9pEmAx26HcbKVrABvgL7AwA5fjNFoDc';
|
||||||
var changeAddress = 'mgBCJAsvzgT2qNNeXsoECg2uPKrUsZ76up';
|
var changeAddress = 'mgBCJAsvzgT2qNNeXsoECg2uPKrUsZ76up';
|
||||||
var changeAddressP2SH = '2N7T3TAetJrSCruQ39aNrJvYLhG1LJosujf';
|
var changeAddressP2SH = '2N7T3TAetJrSCruQ39aNrJvYLhG1LJosujf';
|
||||||
@ -490,9 +490,9 @@ describe('Transaction', function() {
|
|||||||
}).to.throw(errors.Transaction.NLockTimeOutOfRange);
|
}).to.throw(errors.Transaction.NLockTimeOutOfRange);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('handles weird output', function() {
|
it('handles anyone-can-spend utxo', function() {
|
||||||
var transaction = new Transaction()
|
var transaction = new Transaction()
|
||||||
.from(weirdUtxoWith100000Satoshis)
|
.from(anyoneCanSpendUTXO)
|
||||||
.to(toAddress, 50000);
|
.to(toAddress, 50000);
|
||||||
should.exist(transaction);
|
should.exist(transaction);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user