Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC60e82388731b: [chronik] Electrum: implement the blockchain.transaction.id_from_pos endpoint
./test/functional/test_runner.py chronik_electrum_blockchain
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- chronik_get_pos
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Event Timeline
blockchain-transaction-id-from-pos
TIL
| chronik/chronik-http/src/electrum.rs | ||
|---|---|---|
| 1676 ↗ | (On Diff #54310) | if we have special error conditions here, we should test them |
| 1680 ↗ | (On Diff #54310) | ditto |
| 1688 ↗ | (On Diff #54310) | ditto |
| 1712 ↗ | (On Diff #54310) | i think this return is not tested |
| test/functional/chronik_electrum_blockchain.py | ||
| 576 ↗ | (On Diff #54310) | this is bc block 33 does not exist right? if so, should add another test confirming we also get the expected error in an existing block if just the position does not exist let tx_count = 42
assert_equal(
self.client.blockchain.transaction.id_from_pos(self.node.getblockcount(), tx_count+1).error,
{
"code": 1,
"message": "No transaction at position 43 for height <height>",
},
) |
| chronik/chronik-http/src/electrum.rs | ||
|---|---|---|
| 1676 ↗ | (On Diff #54310) | Yes the same code is covered in other similar endpoints, but it can't hurt to repeat the test. |
| test/functional/chronik_electrum_blockchain.py | ||
| 576 ↗ | (On Diff #54310) | It ends up being the same message if the block doesn't exist and/or the tx index is out of bounds. I will expand the test to cover both cases. |
| test/functional/chronik_electrum_blockchain.py | ||
|---|---|---|
| 576 ↗ | (On Diff #54310) | grok has theories |
| test/functional/chronik_electrum_blockchain.py | ||
|---|---|---|
| 576 ↗ | (On Diff #54310) | The first one is correct, it's from an old ad for this car |

