Skip to content

Commit e10cde3

Browse files
committed
chainparams: Remove index from chainparams
We no longer use it to reference chainparams, so we can remove it completely.
1 parent f417dfa commit e10cde3

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

bitcoin/chainparams.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#include <string.h>
55

66
const struct chainparams networks[] = {
7-
{.index = 0,
8-
.network_name = "bitcoin",
7+
{.network_name = "bitcoin",
98
.bip173_name = "bc",
109
.genesis_blockhash = {{{.u.u8 = {0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72, 0xc1, 0xa6, 0xa2, 0x46, 0xae, 0x63, 0xf7, 0x4f, 0x93, 0x1e, 0x83, 0x65, 0xe1, 0x5a, 0x08, 0x9c, 0x68, 0xd6, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00}}}},
1110
.rpc_port = 8332,
@@ -23,8 +22,7 @@ const struct chainparams networks[] = {
2322
/* "Lightning Charge Powers Developers & Blockstream Store" */
2423
.when_lightning_became_cool = 504500,
2524
.testnet = false},
26-
{.index = 1,
27-
.network_name = "regtest",
25+
{.network_name = "regtest",
2826
.bip173_name = "bcrt",
2927
.genesis_blockhash = {{{.u.u8 = {0x06, 0x22, 0x6e, 0x46, 0x11, 0x1a, 0x0b, 0x59, 0xca, 0xaf, 0x12, 0x60, 0x43, 0xeb, 0x5b, 0xbf, 0x28, 0xc3, 0x4f, 0x3a, 0x5e, 0x33, 0x2a, 0x1f, 0xc7, 0xb2, 0xb7, 0x3c, 0xf1, 0x88, 0x91, 0x0f}}}},
3028
.rpc_port = 18332,
@@ -35,8 +33,7 @@ const struct chainparams networks[] = {
3533
.max_payment_msat = 0xFFFFFFFFULL,
3634
.when_lightning_became_cool = 1,
3735
.testnet = true},
38-
{.index = 2,
39-
.network_name = "testnet",
36+
{.network_name = "testnet",
4037
.bip173_name = "tb",
4138
.genesis_blockhash = {{{.u.u8 = {0x43, 0x49, 0x7f, 0xd7, 0xf8, 0x26, 0x95, 0x71, 0x08, 0xf4, 0xa3, 0x0f, 0xd9, 0xce, 0xc3, 0xae, 0xba, 0x79, 0x97, 0x20, 0x84, 0xe9, 0x0e, 0xad, 0x01, 0xea, 0x33, 0x09, 0x00, 0x00, 0x00, 0x00}}}},
4239
.rpc_port = 18332,
@@ -46,8 +43,7 @@ const struct chainparams networks[] = {
4643
.max_funding_satoshi = (1 << 24) - 1,
4744
.max_payment_msat = 0xFFFFFFFFULL,
4845
.testnet = true},
49-
{.index = 3,
50-
.network_name = "litecoin",
46+
{.network_name = "litecoin",
5147
.bip173_name = "ltc",
5248
.genesis_blockhash = {{{.u.u8 = {0xe2, 0xbf, 0x04, 0x7e, 0x7e, 0x5a, 0x19, 0x1a, 0xa4, 0xef, 0x34, 0xd3, 0x14, 0x97, 0x9d, 0xc9, 0x98, 0x6e, 0x0f, 0x19, 0x25, 0x1e, 0xda, 0xba, 0x59, 0x40, 0xfd, 0x1f, 0xe3, 0x65, 0xa7, 0x12 }}}},
5349
.rpc_port = 9332,
@@ -58,8 +54,7 @@ const struct chainparams networks[] = {
5854
.max_payment_msat = 60 * 0xFFFFFFFFULL,
5955
.when_lightning_became_cool = 1320000,
6056
.testnet = false},
61-
{.index = 4,
62-
.network_name = "litecoin-testnet",
57+
{.network_name = "litecoin-testnet",
6358
.bip173_name = "tltc",
6459
.genesis_blockhash = {{{.u.u8 = { 0xa0, 0x29, 0x3e, 0x4e, 0xeb, 0x3d, 0xa6, 0xe6, 0xf5, 0x6f, 0x81, 0xed, 0x59, 0x5f, 0x57, 0x88, 0x0d, 0x1a, 0x21, 0x56, 0x9e, 0x13, 0xee, 0xfd, 0xd9, 0x51, 0x28, 0x4b, 0x5a, 0x62, 0x66, 0x49 }}}},
6560
.rpc_port = 19332,

bitcoin/chainparams.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <stdbool.h>
88

99
struct chainparams {
10-
const int index;
1110
const char *network_name;
1211
const char *bip173_name;
1312
const struct bitcoin_blkid genesis_blockhash;

0 commit comments

Comments
 (0)