Skip to content

Commit

Permalink
Remove concept of stateful transaction signers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schildbach committed Apr 15, 2018
1 parent ade58d2 commit 9d6090a
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 1,283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* some local API or something else.
* </p>
*/
public abstract class CustomTransactionSigner extends StatelessTransactionSigner {
public abstract class CustomTransactionSigner implements TransactionSigner {
private static final Logger log = LoggerFactory.getLogger(CustomTransactionSigner.class);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* the same derivation path.</p>
* <p>This signer always uses {@link Transaction.SigHash#ALL} signing mode.</p>
*/
public class LocalTransactionSigner extends StatelessTransactionSigner {
public class LocalTransactionSigner implements TransactionSigner {
private static final Logger log = LoggerFactory.getLogger(LocalTransactionSigner.class);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException
* for P2SH or MissingPrivateKeyException for other transaction types.
*/
public class MissingSigResolutionSigner extends StatelessTransactionSigner {
public class MissingSigResolutionSigner implements TransactionSigner {
private static final Logger log = LoggerFactory.getLogger(MissingSigResolutionSigner.class);

public Wallet.MissingSigsMode missingSigsMode = Wallet.MissingSigsMode.USE_DUMMY_SIG;
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions core/src/main/java/org/bitcoinj/signers/TransactionSigner.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ class MissingSignatureException extends RuntimeException {
*/
boolean isReady();

/**
* Returns byte array of data representing state of this signer. It's used to serialize/deserialize this signer
*/
byte[] serialize();

/**
* Uses given byte array of data to reconstruct internal state of this signer
*/
void deserialize(byte[] data);

/**
* Signs given transaction's inputs.
* Returns true if signer is compatible with given transaction (can do something meaningful with it).
Expand Down

0 comments on commit 9d6090a

Please sign in to comment.