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:
parent
7b83e330df
commit
bbd82746ee
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user