3
0
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:
Mike Hearn 2012-03-26 15:41:56 +02:00
parent 0c90081c12
commit 11117dacbe

View File

@ -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();
}