package org.bitcoinj.core;/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * Copyright 2020 Dash Core Group
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * This file was generated by SWIG (http://www.swig.org) and modified.
 * Version 3.0.12
 */


import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.store.SPVBlockStore;

import java.io.File;
import java.util.Random;

/**
 * A MemoryStore implementation of the FullPrunedBlockStoreTest
 */
public class SPVChainLockBlockChainTest extends ChainLockBlockChainTest
{
    File tempFile;
    @Override
    public BlockStore createStore(NetworkParameters params, int blockCount) throws BlockStoreException {
        try {
            tempFile = new File("test-spv-chain-" + new Random().nextLong() + ".spv");
            return new SPVBlockStore(params, tempFile, SPVBlockStore.DEFAULT_CAPACITY, true);
        } catch (Exception x) {
            throw new BlockStoreException("Cannot access temporary file");
        }
    }

    @Override
    public void resetStore(BlockStore store) throws BlockStoreException
    {
        //No-op for memory store, because it's not persistent
        store.close();
        tempFile.deleteOnExit();
    }
}

@@ -1,591 +1,4 @@
-package org.bitcoinj.core;/*%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A
 /*%0A 
@@ -683,16 +683,42 @@
 .12%0A */%0A
+package org.bitcoinj.core;
 %0A%0Aimport

fix license on SPVChainLockBlockChainTest