def main():
    if (len(sys.argv) < 2):
        print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
        exit(1)
    g = sys.stdout
    indir = sys.argv[1]
    g.write('#ifndef WAZ_CHAINPARAMSSEEDS_H\n')
    g.write('#define WAZ_CHAINPARAMSSEEDS_H\n')
    g.write('/**\n')
    g.write(' * List of fixed seed nodes for the wuazi network\n')
    g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
    g.write(' *\n')
    g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
    g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
    g.write(' */\n')
    with open(os.path.join(indir, 'nodes_main.txt'), 'r') as f:
        process_nodes(g, f, 'pnSeed6_main', 9999)
    g.write('\n')
    with open(os.path.join(indir, 'nodes_test.txt'), 'r') as f:
        process_nodes(g, f, 'pnSeed6_test', 19999)
    g.write('#endif // WAZ_CHAINPARAMSSEEDS_H\n')
def main():
    if (len(sys.argv) < 2):
        print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
        exit(1)
    g = sys.stdout
    indir = sys.argv[1]
    g.write('#ifndef WAZ_CHAINPARAMSSEEDS_H\n')
    g.write('#define WAZ_CHAINPARAMSSEEDS_H\n')
    g.write('/**\n')
    g.write(' * List of fixed seed nodes for the wuazi network\n')
    g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
    g.write(' *\n')
    g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
    g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
    g.write(' */\n')
    with open(os.path.join(indir, 'nodes_main.txt'), 'r') as f:
        process_nodes(g, f, 'pnSeed6_main', 9999)
    g.write('\n')
    with open(os.path.join(indir, 'nodes_test.txt'), 'r') as f:
        process_nodes(g, f, 'pnSeed6_test', 19999)
    g.write('#endif // WAZ_CHAINPARAMSSEEDS_H\n')