mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
FullPrunedBlockChain: don't log if script is unparseable and simplify getScript function.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user