Skip to content

Commit

Permalink
Use database for mock mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Warchant committed Jan 24, 2020
1 parent 2e909b5 commit bdad073
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,4 @@ scripts/certs/
certs/

.scannerwork
.idea
4 changes: 4 additions & 0 deletions altchain-pop-miner/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

generated

mock
mock.dat
mock-shm
mock-wal
pop.dat
*.spvchain
*.wallet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ private val logger = createLogger {}
class MockMiner(
private val pluginFactory: PluginService
) : Miner {
private val veriBlockStore = VeriBlockStore(ConnectionSelector.setConnectionInMemory())
private val bitcoinStore = BitcoinStore(ConnectionSelector.setConnectionInMemory())
private val connection = ConnectionSelector.setConnection("mock")
private val veriBlockStore = VeriBlockStore(connection)
private val bitcoinStore = BitcoinStore(connection)
private val veriBlockBlockchain = VeriBlockBlockchain(VeriBlockDefaults.networkParameters, veriBlockStore, bitcoinStore)
private val bitcoinBlockchain = BitcoinBlockchain(BitcoinDefaults.networkParameters, bitcoinStore)
private val vpm = VeriBlockPopMiner(veriBlockBlockchain, bitcoinBlockchain)
Expand Down

0 comments on commit bdad073

Please sign in to comment.