mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 18:25:51 +00:00
Throw an exception rather than assert on trying to get from address of generation transaction
This commit is contained in:
parent
91a5949930
commit
58971b6728
@ -168,7 +168,9 @@ public class TransactionInput extends ChildMessage implements Serializable {
|
||||
* @throws ScriptException if the scriptSig could not be understood (eg, if this is a coinbase transaction).
|
||||
*/
|
||||
public Address getFromAddress() throws ScriptException {
|
||||
assert !isCoinBase();
|
||||
if (isCoinBase()) {
|
||||
throw new ScriptException("coinbase transaction");
|
||||
}
|
||||
return getScriptSig().getFromAddress();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user