Repository navigation
Commit 1df7af7
committed
electrum: serve the indexed genesis hash in server.features
Addresses review on Blockstream#265. server.features now reports the genesis
block hash actually indexed at height 0 instead of the hardcoded
genesis_hash(config.network_type). The latter returns an all-zero
placeholder on Liquid testnet/regtest and can't reflect configurable
Elements regtest genesis blocks.
RPC::start runs after the initial sync, so height 0 is already
indexed; fall back to genesis_hash() only if it somehow isn't.
Also strengthens the test to assert the returned genesis_hash equals
the daemon's height-0 block hash (reversed, per the Electrum wire
format), rather than only checking it is a string.1 parent e8e2e6c commit 1df7af7
2 files changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
1252 | 1261 | | |
1253 | 1262 | | |
1254 | 1263 | | |
1255 | | - | |
| 1264 | + | |
1256 | 1265 | | |
1257 | 1266 | | |
1258 | 1267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
234 | 248 | | |
235 | 249 | | |
236 | 250 | | |
| |||
0 commit comments