After a long IRC discussion, it was decided that the use of direct
filepaths instead of the module is a more pure form of testing ,
although it may provide less overall coverage than the mixed integration
style imports used previously.
This will need to be remedied by further integration testing in
/test/integration.
It is favoured to compose the scriptSig manually using
Script.createP2SHScriptSig and Script.createMultisigScriptSig.
Added a test to verify that createMultisigScriptSig throws when not
enough signatures a provided and the redeemScript is given.
A Transaction (and its subsequent scripts) do not carry any network
specific information in the Bitcoin protocol.
Therefore they can not (without further context) produce the network
specific constants for the generation of the base58 Addresses.
As TransactionOut.address is used heavily throughout Wallet and other
areas of the library, this could not be entirely removed without a large
number of changes.
For now, TransactionOut.address is only defined in the case of
Tx.addOutput being used directly:
Transaction.addOutput(address, value)
Extracts the two Script types out of Script.createOutputScript, and puts
them both under test.
Also renames Script.createMultiSigOutputScript to adhere to the same
convention.
Script.fromHex previously existed, but was not under any kind of test.
This commit adds tests (despite being a little circular in nature) to
check that the output is as expected.
refactored the previous multi-sig address test a bit and added a test
to validate the # of signatures required and possible addresses
included in the redeemscript
This is a test I have been using to validate a 2-of-3 multi sig address
using known public keys as well as validating the multi sig address
from the redeem script. I am working on more redeem script validation
tests but I want to make sure I am on the right track and see if this
test is something you all would deem useful.