mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01:00
Clear another FindBugs warning in SPVBlockStore.
The analysis doesn't seem to be good enough to detect that some of these cases are safe.
This commit is contained in:
parent
b780c6f191
commit
83308c6ee1
1 changed files with 5 additions and 2 deletions
|
@ -145,8 +145,11 @@ public class SPVBlockStore implements BlockStore {
|
|||
buffer.put(header);
|
||||
// Insert the genesis block.
|
||||
lock.lock();
|
||||
setRingCursor(buffer, FILE_PROLOGUE_BYTES);
|
||||
lock.unlock();
|
||||
try {
|
||||
setRingCursor(buffer, FILE_PROLOGUE_BYTES);
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
Block genesis = params.genesisBlock.cloneAsHeader();
|
||||
StoredBlock storedGenesis = new StoredBlock(genesis, genesis.getWork(), 0);
|
||||
put(storedGenesis);
|
||||
|
|
Loading…
Add table
Reference in a new issue