Closed gitcoindev closed 1 year ago
I see the test cases passes alone but is shaky and failing when running with other tests e.g.
TEST | STATUS | DURATION
rpc_createmultisig.py | ✓ Passed | 7 s
rpc_fundrawtransaction.py --legacy-wallet | ✓ Passed | 79 s
rpc_fundrawtransaction.py --descriptors | ✖ Failed | 4 s
ALL | ✖ Failed | 90 s (accumulated)
Runtime: 79 s
still need to analyse this..
It gets interesting - the rpc_fundrawtransaction test is failing in random tests (even with running just test/functional/rpc_fundrawtransaction.py --descriptors) but after adding additional logs it always fails with the same wrong feeDelta value (sometimes 0.00000011 or -0.00000011). To be continued..
Case 1
2022-12-14T09:49:42.482000Z TestFramework (INFO): Test fundrawtxn p2pkh fee
2022-12-14T09:49:42.521000Z TestFramework (INFO): 0.00000142
2022-12-14T09:49:42.521000Z TestFramework (INFO): 0.00000142
2022-12-14T09:49:42.521000Z TestFramework (INFO): feeDelta 0.00000000
2022-12-14T09:49:42.521000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:49:43.523000Z TestFramework (INFO): Test fundrawtxn p2pkh fee with multiple outputs
2022-12-14T09:49:43.573000Z TestFramework (INFO): 0.00000297
2022-12-14T09:49:43.573000Z TestFramework (INFO): 0.00000297
2022-12-14T09:49:43.574000Z TestFramework (INFO): feeDelta 0.00000000
2022-12-14T09:49:43.574000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:49:44.627000Z TestFramework (INFO): 0.00000131
2022-12-14T09:49:44.627000Z TestFramework (INFO): 0.00000131
2022-12-14T09:49:44.627000Z TestFramework (INFO): feeDelta 0.00000000
2022-12-14T09:49:44.627000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:49:45.631000Z TestFramework (INFO): Test fundrawtxn fee with 4-of-5 addresses
2022-12-14T09:49:45.681000Z TestFramework (INFO): 0.00000142
2022-12-14T09:49:45.682000Z TestFramework (INFO): 0.00000131
2022-12-14T09:49:45.682000Z TestFramework (INFO): feeDelta 0.00000011
2022-12-14T09:49:45.682000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:49:45.682000Z TestFramework (ERROR): Assertion failed
Case 2
2022-12-14T09:50:16.965000Z TestFramework (INFO): Test fundrawtxn p2pkh fee with multiple outputs
2022-12-14T09:50:17.016000Z TestFramework (INFO): 0.00000297
2022-12-14T09:50:17.017000Z TestFramework (INFO): 0.00000308
2022-12-14T09:50:17.017000Z TestFramework (INFO): feeDelta -0.00000011
2022-12-14T09:50:17.017000Z TestFramework (INFO): fee_tolerance 0.00000002
Case 3
2022-12-14T09:50:34.900000Z TestFramework (INFO): Test fundrawtxn p2pkh fee with multiple outputs
2022-12-14T09:50:34.939000Z TestFramework (INFO): 0.00000297
2022-12-14T09:50:34.939000Z TestFramework (INFO): 0.00000297
2022-12-14T09:50:34.939000Z TestFramework (INFO): feeDelta 0.00000000
2022-12-14T09:50:34.939000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:50:35.982000Z TestFramework (INFO): 0.00000131
2022-12-14T09:50:35.982000Z TestFramework (INFO): 0.00000142
2022-12-14T09:50:35.982000Z TestFramework (INFO): feeDelta -0.00000011
2022-12-14T09:50:35.982000Z TestFramework (INFO): fee_tolerance 0.00000002
Case 4
2022-12-14T09:50:59.478000Z TestFramework (INFO): Test fundrawtxn p2pkh fee
2022-12-14T09:50:59.504000Z TestFramework (INFO): 0.00000153
2022-12-14T09:50:59.504000Z TestFramework (INFO): 0.00000142
2022-12-14T09:50:59.504000Z TestFramework (INFO): feeDelta 0.00000011
2022-12-14T09:50:59.504000Z TestFramework (INFO): fee_tolerance 0.00000002
Case 5
2022-12-14T09:51:23.057000Z TestFramework (INFO): Test fundrawtxn p2pkh fee with multiple outputs
2022-12-14T09:51:23.103000Z TestFramework (INFO): 0.00000297
2022-12-14T09:51:23.103000Z TestFramework (INFO): 0.00000308
2022-12-14T09:51:23.103000Z TestFramework (INFO): feeDelta -0.00000011
2022-12-14T09:51:23.103000Z TestFramework (INFO): fee_tolerance 0.00000002
2022-12-14T09:51:23.103000Z TestFramework (ERROR): Assertion failed
Another observation - after disabling previous tests in rpc_fundrawtransaction 10/10 times always PASS.
Fixed by reordering the fee tests to the front. The tests them-self should depend on each other but in this case they do. With the fix 10/10 PASS rate.
Description
This pull request fixes rpc_fundrawtransaction.py functional test case.
Notes
Integrated from Bitcoin core.