3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

FullPrunedBlockChain: don't log if script is unparseable and simplify getScript function.

This commit is contained in:
Mike Hearn 2014-12-17 01:22:42 +01:00
parent 7b83e330df
commit bbd82746ee

View File

@ -150,20 +150,14 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
}
}
/**
* Get the {@link Script} from the script bytes.
* @param scriptBytes The script bytes.
* @return The script.
*/
/** Get the {@link Script} from the script bytes or null if it doesn't parse. */
@Nullable
private Script getScript(byte[] scriptBytes) {
Script script = null;
try {
script = new Script(scriptBytes);
return new Script(scriptBytes);
} catch (Exception e) {
log.warn("Unable to parse script");
return null;
}
return script;
}
/**