Details
- Reviewers
tobias_ruck - Group Reviewers
Restricted Project - Commits
- rABCaaff0e599d1b: [chronik-client] Support history, confirmedTxs, unconfirmedTxs for plugins…
CI tests
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- cc-plugin-moar-methods
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Event Timeline
modules/chronik-client/test/integration/plugins.ts | ||
---|---|---|
634 | I took this sorting from the existing chronik-client tests in script_endpoints.ts It's not what is being tested in the setup script: txs = sorted([proto_tx1, proto_tx2], key=lambda t: t.txid[::-1]) which then matches confirmed txs, and matches the reverse of history ...I don't think history is just alphabetical backwards by txid, which I think is what the setup script is testing? Either the setup script or this test is using a sort that "happens to work" |
modules/chronik-client/test/integration/plugins.ts | ||
---|---|---|
634 | if you remove the sort by txid logic above, do the tests still pass? |
modules/chronik-client/test/integration/plugins.ts | ||
---|---|---|
634 | lol mb but the point is we want to show that the txs are sorted the way they are expected to be sorted. [first Tx, secondTx] might just happen to be "the right way" ... it's hard to tell with only 2 txs I know the tests pass if I follow what is tested in the setup script, i.e. "alphabetical by txid and then the opposite of that" ... but I don't think there is any reason for the indexer to return "opposite of alphabetical by txid" -- so either
|
modules/chronik-client/test/integration/plugins.ts | ||
---|---|---|
634 | in this test the timeFirstSeen is the same for both so I didn't add it to the lambda it's more about the txs being there; the right order should be tested in the script_group tests | |
703 | any reason to remove the const? it should just shadow correctly I try to avoid mutable variables with big scopes |
ok updated sorting with comment, removed globals
modules/chronik-client/test/integration/plugins.ts | ||
---|---|---|
703 | fixed when I started the test, I didn't realize these would change between scopes |