itest+lntest: speed up test setup#9195
Conversation
This commit fixes the methods used in `lntest` so they stop using pointers to chainhash.
So we only need to do one `GetRawMempool` lookup when checking the exclusion of multiple txns.
| // above a good number of confirmations. | ||
| const totalTxes = 200 | ||
| h.MineBlocksAndAssertNumTxes(numBlocksSendOutput, totalTxes) | ||
| h.MineBlocks(numBlocksSendOutput) |
There was a problem hiding this comment.
nit: may move this change to its own commit, the motivation is not clear
There was a problem hiding this comment.
it's a mistake...was doing a performance comparison and forgot to remove it🤦🏻
will remove it in my other PRs since it's minor
| // We require the RPC call to be succeeded and won't wait for | ||
| // it as it's an unexpected behavior. |
There was a problem hiding this comment.
nit: not sure I understand that comment
There was a problem hiding this comment.
Seems to be copy/paste, appears in a couple of other places. I interpret it as: "this will call ht.t.Fail() if it doesn't succeed, which will abort the test, so we can continue below assuming it didn't fail".
| // We require the RPC call to be succeeded and won't wait for | ||
| // it as it's an unexpected behavior. |
There was a problem hiding this comment.
Seems to be copy/paste, appears in a couple of other places. I interpret it as: "this will call ht.t.Fail() if it doesn't succeed, which will abort the test, so we can continue below assuming it didn't fail".
Turns out we are doing 200
GetRawMempoolRPC calls when setting up the test case, which is now optimized.Before this change,
After this change,
Also changes the methods so we don't pass pointers of
chainhash.Hashanymore in the tests.Thanks @bitromortac for pointing this out!