(self)
| 567 | self.vchCommitment = b'\x01' + amount[::-1] |
| 568 | |
| 569 | def getAmount(self): |
| 570 | if self.vchCommitment[0] != 1: |
| 571 | raise ValueError('getAmount() called on non-explicit CTxOutValue') |
| 572 | ret = 0 |
| 573 | for i in range(8): #8 bytes |
| 574 | ret <<= 8 |
| 575 | ret |= self.vchCommitment[i+1] |
| 576 | return ret |
| 577 | |
| 578 | def __repr__(self): |
| 579 | return "CTxOutValue(vchCommitment=%s)" % self.vchCommitment |
no outgoing calls