mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 06:44:16 +00:00
Be super-explicit in the error message for calling getFromAddress on a coinbase transaction input.
This commit is contained in:
parent
0c90081c12
commit
11117dacbe
@ -170,7 +170,8 @@ public class TransactionInput extends ChildMessage implements Serializable {
|
||||
*/
|
||||
public Address getFromAddress() throws ScriptException {
|
||||
if (isCoinBase()) {
|
||||
throw new ScriptException("coinbase transaction");
|
||||
throw new ScriptException(
|
||||
"This is a coinbase transaction which generates new coins. It does not have a from address.");
|
||||
}
|
||||
return getScriptSig().getFromAddress();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user