Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115291
D8339.id25600.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D8339.id25600.diff
View Options
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
--- a/contrib/seeds/generate-seeds.py
+++ b/contrib/seeds/generate-seeds.py
@@ -22,10 +22,10 @@
The output will be two data structures with the peers in binary format:
- static SeedSpec6 pnSeed6_main[]={
+ static std::vector<SeedSpec6> pnSeed6_main = {
...
}
- static SeedSpec6 pnSeed6_test[]={
+ static std::vector<SeedSpec6> pnSeed6_test = {
...
}
@@ -98,7 +98,7 @@
def process_nodes(g, f, structname, defaultport):
- g.write('static SeedSpec6 {}[] = {{\n'.format(structname))
+ g.write('static std::vector<SeedSpec6> {} = {{\n'.format(structname))
first = True
for line in f:
comment = line.find('#')
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -200,9 +200,7 @@
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};
cashaddrPrefix = "bitcoincash";
-
- vFixedSeeds = std::vector<SeedSpec6>(
- pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
+ vFixedSeeds = pnSeed6_main;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
@@ -393,8 +391,7 @@
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
cashaddrPrefix = "bchtest";
- vFixedSeeds = std::vector<SeedSpec6>(
- pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
+ vFixedSeeds = pnSeed6_test;
fDefaultConsistencyChecks = false;
fRequireStandard = false;
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
--- a/src/chainparamsseeds.h
+++ b/src/chainparamsseeds.h
@@ -7,7 +7,7 @@
* Each line contains a 16-byte IPv6 address and a port.
* IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.
*/
-static SeedSpec6 pnSeed6_main[] = {
+static std::vector<SeedSpec6> pnSeed6_main = {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0x5a,0x8d,0x0d}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x78,0x09,0xd8}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x19,0xf1,0xe0}, 8333},
@@ -93,7 +93,7 @@
{{0x2a,0x04,0x21,0x80,0x00,0x01,0x00,0x11,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x16}, 8333}
};
-static SeedSpec6 pnSeed6_test[] = {
+static std::vector<SeedSpec6> pnSeed6_test = {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x89,0x44,0x8c}, 48433},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xbd,0x8d,0x4f}, 18333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xfd,0x33,0xeb}, 18333},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 10:43 (11 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187382
Default Alt Text
D8339.id25600.diff (2 KB)
Attached To
D8339: Move seed list vector operations into distinct compilation unit
Event Timeline
Log In to Comment