Milestone 3: RPC server, ZIP-320 #104
2 changed files with 7 additions and 3 deletions
|
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- `listaccounts` RPC method
|
- `listaccounts` RPC method
|
||||||
- `listaddresses` RPC method
|
- `listaddresses` RPC method
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Detection of changes in database schema for automatic re-scan
|
||||||
|
|
||||||
## [0.6.0.0-beta]
|
## [0.6.0.0-beta]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -307,13 +307,11 @@ initDb ::
|
||||||
T.Text -- ^ The database path to check
|
T.Text -- ^ The database path to check
|
||||||
-> IO (Either String Bool)
|
-> IO (Either String Bool)
|
||||||
initDb dbName = do
|
initDb dbName = do
|
||||||
print "Start database"
|
|
||||||
j <-
|
j <-
|
||||||
try $ PS.runSqlite dbName $ runMigrationQuiet migrateAll :: IO
|
try $ PS.runSqlite dbName $ runMigrationQuiet migrateAll :: IO
|
||||||
(Either SomeException [T.Text])
|
(Either SomeException [T.Text])
|
||||||
case j of
|
case j of
|
||||||
Left e1 -> do
|
Left _e1 -> do
|
||||||
print e1
|
|
||||||
pool <- runNoLoggingT $ initPool dbName
|
pool <- runNoLoggingT $ initPool dbName
|
||||||
wallets <-
|
wallets <-
|
||||||
runNoLoggingT $
|
runNoLoggingT $
|
||||||
|
@ -345,6 +343,8 @@ initDb dbName = do
|
||||||
runNoLoggingT $
|
runNoLoggingT $
|
||||||
PS.retryOnBusy $
|
PS.retryOnBusy $
|
||||||
flip PS.runSqlPool backupPool $ insertMany_ $ entityVal <$> abook
|
flip PS.runSqlPool backupPool $ insertMany_ $ entityVal <$> abook
|
||||||
|
clearWalletTransactions pool
|
||||||
|
clearWalletData pool
|
||||||
m <-
|
m <-
|
||||||
try $ PS.runSqlite dbName $ runMigrationQuiet migrateAll :: IO
|
try $ PS.runSqlite dbName $ runMigrationQuiet migrateAll :: IO
|
||||||
(Either SomeException [T.Text])
|
(Either SomeException [T.Text])
|
||||||
|
|
Loading…
Reference in a new issue