Docker image #89

Merged
pitmutt merged 45 commits from milestone2 into master 2024-06-21 18:15:53 +00:00
3 changed files with 19 additions and 0 deletions
Showing only changes of commit 2fb6747bfb - Show all commits

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
.stack-work/
*~
dist-newstyle/
zenith.db
zenith.log

View file

@ -246,6 +246,12 @@ share
position Int
UniqueSSPos tx position
deriving Show Eq
AddressBook
network ZcashNetDB
descrip T.Text
address HexStringDB
UniqueABA address
deriving Show Eq
|]
-- * Database functions
@ -1467,5 +1473,16 @@ readUnifiedAddressDB :: WalletAddress -> Maybe UnifiedAddress
readUnifiedAddressDB =
isValidUnifiedAddress . TE.encodeUtf8 . getUA . walletAddressUAddress
-- | Get list of external zcash addresses from database
getAdrBook :: ConnectionPool -> ZcashNet -> IO [Entity AddressBook]
getAdrBook pool n =
runNoLoggingT $
PS.retryOnBusy $
flip PS.runSqlPool pool $ do
select $ do
adrbook <- from $ table @AddressBook
where_ (adrbook ^. AddressBookNetwork ==. val (ZcashNetDB n))
pure adrbook
rmdups :: Ord a => [a] -> [a]
rmdups = map head . group . sort

BIN
zenith.db

Binary file not shown.