Package org.bitcoinj.wallet
Class DefaultRiskAnalysis
java.lang.Object
org.bitcoinj.wallet.DefaultRiskAnalysis
- All Implemented Interfaces:
RiskAnalysis
The default risk analysis. Currently, it only is concerned with whether a tx/dependency is non-final or not, and whether a tx/dependency violates the dust rules. Outside of specialised protocols you should not encounter non-final transactions.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
The reason a transaction is considered non-standard, returned byisStandard(Transaction)
.Nested classes/interfaces inherited from interface org.bitcoinj.wallet.RiskAnalysis
RiskAnalysis.Result
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected final List<Transaction>
static DefaultRiskAnalysis.Analyzer
protected Transaction
protected final Transaction
protected final Wallet
-
Method Summary
Modifier and TypeMethodDescriptionanalyze()
Returns the transaction that was found to be non-final, or null.Returns the transaction that was found to be non-standard, or null.isInputStandard
(TransactionInput input) Checks if the given input passes some of the AreInputsStandard checks.isOutputStandard
(TransactionOutput output) Checks the output to see if the script violates a standardness rule.Checks if a transaction is considered "standard" by Bitcoin Core's IsStandardTx and AreInputsStandard functions.toString()
-
Field Details
-
tx
-
dependencies
-
wallet
-
nonFinal
-
analyzed
protected boolean analyzed -
FACTORY
-
-
Method Details
-
analyze
- Specified by:
analyze
in interfaceRiskAnalysis
-
isStandard
Checks if a transaction is considered "standard" by Bitcoin Core's IsStandardTx and AreInputsStandard functions.
Note that this method currently only implements a minimum of checks. More to be added later.
-
isOutputStandard
Checks the output to see if the script violates a standardness rule. Not complete. -
isInputStandard
Checks if the given input passes some of the AreInputsStandard checks. Not complete. -
getNonStandard
Returns the transaction that was found to be non-standard, or null. -
getNonFinal
Returns the transaction that was found to be non-final, or null. -
toString
-