Changeset 337
- Timestamp:
- 06/18/11 11:06:01 (1 year ago)
- Location:
- trunk/sandbox/jhb/oc2
- Files:
-
- 2 modified
-
documentation.py (modified) (4 diffs)
-
wallet.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sandbox/jhb/oc2/documentation.py
r319 r337 57 57 58 58 >>> testserver.run_once(port,issuer) 59 >>> mkcs = wallet.fetchMintKeys(transport, denominations=['1','5'])59 >>> mkcs = wallet.fetchMintKeys(transport,cdd,denominations=['1','5']) 60 60 >>> mkcs[0].toString() == issuer.getCurrentMKCs()['1'].toString() 61 61 True … … 166 166 167 167 >>> bob.approval = True 168 >>> wallet.announceSum(bob.listenSum, alicetid, 5, 'foobar') 169 True 170 168 >>> alice.announceSum(bob.listenSum, alicetid, 5, 'foobar') 169 True 171 170 172 171 … … 183 182 Or lets try to send a wrong amount 184 183 184 >>> alice.announceSum(bob.listenSum, alicetid, 5, 'foobar') 185 True 185 186 >>> alice.requestSpend(bob.listenSpend,alicetid,[]) 186 187 Traceback (most recent call last): … … 188 189 SpendReject: amount of coins does not match announced one. Announced: 5, got 0 189 190 191 192 >>> alice.announceSum(bob.listenSum, alicetid, 5, 'foobar') 193 True 190 194 >>> alice.requestSpend(bob.listenSpend, alicetid, [coin]) 191 195 True -
trunk/sandbox/jhb/oc2/wallet.py
r327 r337 142 142 143 143 144 def listenSpend(self, transport,message):144 def listenSpend(self,message,transport=None): 145 145 tid = message.transactionId 146 146 amount = sum([int(m.denomination) for m in message.coins])
