Commit 646b593
committed
[tests] Speed up rpc_fundrawtransaction.py
Most of the time in rpc_fundrawtransaction.py is spent waiting for
unconfirmed transactions to propagate. Net processing adds a poisson
random delay to the time it will INV transactions with a mean interval
of 5 seconds. Calls like the following:
```
self.nodes[2].sendrawtransaction(signedTx['hex'])
self.sync_all()
self.nodes[1].generate(1)
````
will therefore introduce a delay waiting for the mempools to sync.
Instead just generate the block on the node that sent the transaction:
```
self.nodes[2].sendrawtransaction(signedTx['hex'])
self.nodes[2].generate(1)
```
rpc_fundrawtransaction.py is not intended to be a test for transaction
relay, so it's ok to do this.1 parent c737839 commit 646b593
1 file changed
+5
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
| 473 | + | |
475 | 474 | | |
476 | 475 | | |
477 | 476 | | |
| |||
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
486 | | - | |
| 484 | + | |
487 | 485 | | |
488 | 486 | | |
489 | 487 | | |
| |||
550 | 548 | | |
551 | 549 | | |
552 | 550 | | |
553 | | - | |
554 | | - | |
| 551 | + | |
555 | 552 | | |
556 | 553 | | |
557 | 554 | | |
| |||
579 | 576 | | |
580 | 577 | | |
581 | 578 | | |
582 | | - | |
583 | | - | |
| 579 | + | |
584 | 580 | | |
585 | 581 | | |
586 | 582 | | |
| |||
597 | 593 | | |
598 | 594 | | |
599 | 595 | | |
600 | | - | |
601 | | - | |
| 596 | + | |
602 | 597 | | |
603 | 598 | | |
604 | 599 | | |
| |||
0 commit comments