Looks good so far, the processing was indeed much much faster. And the progress bars are awesome!
Thanks - have been wanting to get this out (but crazy couple of days as you know!) because I knew there was some low hanging fruit for optimization (+little indexing sprinkled here and there helps a lot!).
What still remains is the problem with "," and "." interpretation of balances within the balance overview which shows super high amounts.
Ah yes, been meaning to simulate that (setting a locale in a VM that has , instead of . so I can replicate myself & test). Remind me again does it also do that on the currencies panel?
And I tested something else what normally shouldn't happen, but this may be handled nevertheless:
I'm using different wallets and I used the MSC wallet with Masterchest, then deleted all Masterchest folders, downloaded the new GitHub version, but changed the wallet.dat inbetween. After starting the new version for some reasons the addresses from the MSC wallet were still shown under addresses, but if I try to send coins, it only shows those from the new wallet. I'm actually a bit surprised, because I deleted also the wallet.sdf etc.
Hmm, we enumerate addresses via multiple RPC methods (because contrary to the bitcoin-core doco, listaddresses does not return all addresses - for example change) but then we check every one via the validateaddress RPC call, using the ismine:true condition before adding to the address stack. Could you do me a favour? In your bitcoin install run the command
validateaddress address on one of your MSC addresses while in your other wallet. I can't see any way that bitcoin would return anything other than ismine:false for that but good to check.
I'm also trying to think of other ways this could occur.
Thanks as always for testing
Zathras
P.S. You can interchange wallet.dat as much as you like (as long as the wallet isn't running of course) - wallet.sdf holds no unique information (otherwise we'd need to encrypt it, back it up etc). Technically calling Masterchest a wallet is a bit of a misnomer, bitcoind/qt is the wallet, Masterchest just overlays an extra layer of functionality over the top (thus allowing me to conveniently inherit the security of the bitcoin-core wallet
)
FYI:
Public Function getaddresses(ByVal bitcoin_con As bitcoinrpcconnection)
Dim addresslist As New List(Of btcaddressbal)
Dim plainaddresslist, myaddresslist As New List(Of String)
'first use listreceivedbyaddress 0 true to get 'all addresses'
Dim addresses As rcvaddress = JsonConvert.DeserializeObject(Of rcvaddress)(rpccall(bitcoin_con, "listreceivedbyaddress", 2, 0, True, 0))
For Each result In addresses.result
plainaddresslist.Add(result.address.ToString)
Next
'since documentation is wrong and this does not list all addresses (eg change), use listunspent to gather up any addresses not returned by listreceivedbyaddress
Dim listunspent As unspent = JsonConvert.DeserializeObject(Of unspent)(rpccall(bitcoin_con, "listunspent", 2, 0, 999999, 0))
For Each result In listunspent.result
If Not plainaddresslist.Contains(result.address.ToString) Then 'avoid duplicates
plainaddresslist.Add(result.address.ToString)
End If
Next
'list_received_byaaddress also returns addresses transactions have been sent to (???) - run additional ismine check on each address
For Each address As String In plainaddresslist
Dim validate As validate = JsonConvert.DeserializeObject(Of validate)(rpccall(bitcoin_con, "validateaddress", 1, address, 0, 0))
If validate.result.ismine = True Then
myaddresslist.Add(address)
End If
Next
...