mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-15 11:45:51 +00:00
SPVBlockStore: Use Charset constant.
This commit is contained in:
parent
ea7ea3b304
commit
93e5f7c57b
@ -20,6 +20,8 @@ import org.bitcoinj.core.*;
|
|||||||
import org.bitcoinj.utils.*;
|
import org.bitcoinj.utils.*;
|
||||||
import org.slf4j.*;
|
import org.slf4j.*;
|
||||||
|
|
||||||
|
import com.google.common.base.Charsets;
|
||||||
|
|
||||||
import javax.annotation.*;
|
import javax.annotation.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.*;
|
import java.nio.*;
|
||||||
@ -131,7 +133,7 @@ public class SPVBlockStore implements BlockStore {
|
|||||||
if (exists) {
|
if (exists) {
|
||||||
header = new byte[4];
|
header = new byte[4];
|
||||||
buffer.get(header);
|
buffer.get(header);
|
||||||
if (!new String(header, "US-ASCII").equals(HEADER_MAGIC))
|
if (!new String(header, Charsets.US_ASCII).equals(HEADER_MAGIC))
|
||||||
throw new BlockStoreException("Header bytes do not equal " + HEADER_MAGIC);
|
throw new BlockStoreException("Header bytes do not equal " + HEADER_MAGIC);
|
||||||
} else {
|
} else {
|
||||||
initNewStore(params);
|
initNewStore(params);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user