Add inputs to a transaction until it has enough in value to meet its out value. include_watching - Also select inputs which are watch only Returns dict: {'tx': Resulting tx, 'fee': Fee the resulting transaction pays, 'changepos': Position of
(self, tx, include_watching=False)
| 383 | return CBitcoinSecret(r) |
| 384 | |
| 385 | def fundrawtransaction(self, tx, include_watching=False): |
| 386 | """Add inputs to a transaction until it has enough in value to meet its out value. |
| 387 | |
| 388 | include_watching - Also select inputs which are watch only |
| 389 | |
| 390 | Returns dict: |
| 391 | |
| 392 | {'tx': Resulting tx, |
| 393 | 'fee': Fee the resulting transaction pays, |
| 394 | 'changepos': Position of added change output, or -1, |
| 395 | } |
| 396 | """ |
| 397 | hextx = hexlify_str(tx.serialize()) |
| 398 | r = self._call('fundrawtransaction', hextx, include_watching) |
| 399 | |
| 400 | r['tx'] = CTransaction.deserialize(unhexlify_str(r['hex'])) |
| 401 | del r['hex'] |
| 402 | |
| 403 | r['fee'] = int(r['fee'] * COIN) |
| 404 | |
| 405 | return r |
| 406 | |
| 407 | def generate(self, numblocks): |
| 408 | """ |
nothing calls this directly
no test coverage detected