Pluggable signers: simple local KeyBag signer

Introduced pluggable signers notion. Instances of
TransactionSigner could be added into the wallet, so that they subsequently
applied to transaction to complete it.
Existing signing code (Transaction.signInputs) was refactored into
LocalTransactionSigner, which is always implicitly added to any wallet.

Related pull request: #157
This commit is contained in:
Kosta Korenkov
2014-06-29 17:54:14 +04:00
committed by Mike Hearn
parent 4a9295ccde
commit f6b2fa5a2b
14 changed files with 1547 additions and 158 deletions

View File

@@ -550,7 +550,7 @@ public class WalletTool {
// For lock times to take effect, at least one output must have a non-final sequence number.
t.getInputs().get(0).setSequenceNumber(0);
// And because we modified the transaction after it was completed, we must re-sign the inputs.
t.signInputs(Transaction.SigHash.ALL, wallet);
wallet.signTransaction(t, Transaction.SigHash.ALL, req.aesKey);
}
} catch (ParseException e) {
System.err.println("Could not understand --locktime of " + lockTimeStr);