Author

Topic: How do wallet balances handle scripts? (Read 622 times)

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
June 19, 2013, 08:12:03 AM
#2
The real answer to your question is this:

Code:
if(isStandard() and isMine())
   balance += value

If the script does not match very simple (and small) set of standard scripts with known "unlock" conditions, then it's considered rogue and ignored by the wallet. 

If someone wants you to have money, they use a standard script.  If someone wants to play game, or you want to experiment with scripts, you'll have to write your own software to experiment with them, because all the existing software will just ignore it.
newbie
Activity: 43
Merit: 0
June 19, 2013, 05:17:39 AM
#1
If you send a transaction with a script that restricts how it is spent then how do wallet balances handle this?

 If I am required to sign with the private key (which I have) but there is a requirement for some further information which the wallet has no way of knowing whether I have or not then will it show up as available to spend? Then later when I come to spend it I find out I can't if I don't have the information.
 Or will it not show up and I won't know I received it?

 Or am I not understanding something about how scripts work?

 Also I was looking for a good description of the mechanics of how wallets calculate and update the balances as I don't fully understand it. Is all the information from the database of UTXO's?
Jump to: