mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 11:45:45 +03:00
scanning types compile
This commit is contained in:
parent
033065b6c4
commit
9bd6431b81
@ -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)
|
||||
|
@ -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)]
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user