Correct data type for getblock
This commit is contained in:
parent
85bf0fef59
commit
fb600aa5fc
1 changed files with 4 additions and 4 deletions
|
@ -1803,14 +1803,14 @@ generateToken = do
|
|||
runCryptoRNGT rngState $ randomString 24 "abcdef0123456789"
|
||||
|
||||
getBlockInfo ::
|
||||
BS.ByteString -> BS.ByteString -> SC.Scientific -> IO (Maybe BlockResponse)
|
||||
BS.ByteString -> BS.ByteString -> T.Text -> IO (Maybe BlockResponse)
|
||||
getBlockInfo nodeUser nodePwd bh = do
|
||||
blockInfo <-
|
||||
makeZcashCall
|
||||
nodeUser
|
||||
nodePwd
|
||||
"getblock"
|
||||
[Number bh, Number $ SC.scientific 1 0]
|
||||
[Data.Aeson.String bh, Number $ SC.scientific 1 0]
|
||||
let content = getResponseBody blockInfo :: RpcResponse BlockResponse
|
||||
if isNothing (err content)
|
||||
then return $ result content
|
||||
|
@ -1825,7 +1825,7 @@ scanTxNative pipe db nodeUser nodePwd = do
|
|||
let ownerList = cast' . Doc <$> keyOwnerList
|
||||
let keyList = map (maybe "" oviewkey) ownerList
|
||||
lastBlockData <- access pipe master db findBlock
|
||||
latestBlock <- getBlockInfo nodeUser nodePwd (SC.scientific (-1) 0)
|
||||
latestBlock <- getBlockInfo nodeUser nodePwd "-1"
|
||||
case latestBlock of
|
||||
Nothing -> fail "No block data from node"
|
||||
Just lB -> do
|
||||
|
@ -1833,7 +1833,7 @@ scanTxNative pipe db nodeUser nodePwd = do
|
|||
Nothing -> do
|
||||
blockList <-
|
||||
mapM
|
||||
(getBlockInfo nodeUser nodePwd . fromInteger)
|
||||
(getBlockInfo nodeUser nodePwd . T.pack . show)
|
||||
[2220000 .. (bl_height lB)]
|
||||
let filteredBlockList = filter filterBlock blockList
|
||||
let txIdList = concatMap extractTxs filteredBlockList
|
||||
|
|
Loading…
Reference in a new issue