scanning types compile

This commit is contained in:
timlucmiptev 2020-10-31 19:26:58 +02:00 committed by ixv
parent 033065b6c4
commit 9bd6431b81
2 changed files with 9 additions and 9 deletions

View File

@ -17,9 +17,8 @@
::
+$ state-0
$: %0
walts=(map xpub:btc walt)
=scanning
=has-used
walts=(map xpub:btc _walt)
=scans
==
::
+$ card card:agent:gall
@ -38,7 +37,7 @@
++ on-init
^- (quip card _this)
~& > '%btc-wallet-store initialized'
`this(state [%0 *(map tape walt) max-gap=20])
`this(state [%0 *(map xpub:btc _walt) *^scans])
++ on-save
^- vase
!>(state)

View File

@ -25,17 +25,18 @@
+$ wach (map address addi)
+$ scon $~([max-index max-index] (pair idx idx))
+$ wilt _bip32
:: scanning: maps xpub+chyg to set of indices.
:: once it's full, we can check whether address in it were blank or not
:: seen: holds addresses whose scan results we've seen already
:: todo: Set of indices; empty it out until none are left--means scanning of that batch is done
:: has-used: whether current batch had any addresses with activity
:: last: index that wallet has been scanned to prior to this batch
::
+$ scanning (jug cord idx)
+$ has-used (map cord ?)
+$ waltscan [todo=(set idx) has-used=? last=idx]
+$ scans (map [xpub chyg] waltscan)
::
+$ action
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @)]
[%update-address a=address utxos=(set utxo)]
==
::
+$ update
$% [%address a=address utxos=(set utxo)]
==