Flo-ify
This commit is contained in:
parent
5abec93d80
commit
3653da2d01
20
README.md
20
README.md
@ -1,8 +1,8 @@
|
||||
# Lcoin (Bcoin ported to Litecoin)
|
||||
# Fcoin (Bcoin ported to Lcoin ported to Flo)
|
||||
|
||||
## Differences between this repo and [bcoin-org/lcoin](https://github.com/bcoin-org/lcoin)
|
||||
## Differences between this repo and [bcoin-org/bcoin](https://github.com/bcoin-org/bcoin)
|
||||
|
||||
* Based on latest bcoin repo, pick litecoin related commits from bcoin-org/lcoin, applied some modifications and fixed more tests.
|
||||
* Based on latest bcoin repo, pick flo related commits from bcoin-org/fcoin, applied some modifications and fixed more tests.
|
||||
* **May rebase and `push --force` frequently, to catch up with bcoin and make repo easy to maintain.**
|
||||
|
||||
## TODO
|
||||
@ -11,15 +11,15 @@
|
||||
* [ ] block-test
|
||||
* [ ] tx-test
|
||||
|
||||
## Lcoin
|
||||
## Fcoin
|
||||
|
||||
__NOTE__: The latest release of lcoin contains a non-backward compatible change
|
||||
__NOTE__: The latest release of fcoin contains a non-backward compatible change
|
||||
to the rest API. Please read the [changelog]'s "migrating" section for more
|
||||
details.
|
||||
|
||||
---
|
||||
|
||||
**Lcoin** is an alternative implementation of the litecoin protocol, written in
|
||||
**Fcoin** is an alternative implementation of the flo protocol, written in
|
||||
node.js.
|
||||
|
||||
## Uses
|
||||
@ -36,10 +36,10 @@ Try it in the browser: http://bcoin.io/browser.html
|
||||
## Install
|
||||
|
||||
```
|
||||
$ git clone git://github.com/ultragtx/lcoin.git
|
||||
$ cd lcoin
|
||||
$ git clone git://github.com/oipwg/fcoin.git
|
||||
$ cd fcoin
|
||||
$ npm install
|
||||
$ ./bin/lcoin
|
||||
$ ./bin/fcoin
|
||||
```
|
||||
|
||||
See the [Beginner's Guide][guide] for more in-depth installation instructions.
|
||||
@ -56,7 +56,7 @@ Join us on [freenode][freenode] in the [#bcoin][irc] channel.
|
||||
|
||||
## Disclaimer
|
||||
|
||||
Lcoin does not guarantee you against theft or lost funds due to bugs, mishaps,
|
||||
Fcoin does not guarantee you against theft or lost funds due to bugs, mishaps,
|
||||
or your own incompetence. You and you alone are responsible for securing your
|
||||
money.
|
||||
|
||||
|
||||
4
bin/cli
4
bin/cli
@ -12,14 +12,14 @@ const ANTIREPLAY = ''
|
||||
+ '220456c656374726f6e696320436173682053797374656d';
|
||||
|
||||
function CLI() {
|
||||
this.config = new Config('lcoin');
|
||||
this.config = new Config('fcoin');
|
||||
|
||||
this.config.load({
|
||||
argv: true,
|
||||
env: true
|
||||
});
|
||||
|
||||
this.config.open('lcoin.conf');
|
||||
this.config.open('fcoin.conf');
|
||||
|
||||
this.argv = this.config.argv;
|
||||
this.client = null;
|
||||
|
||||
2
bin/node
2
bin/node
@ -2,7 +2,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
process.title = 'lcoin';
|
||||
process.title = 'fcoin';
|
||||
|
||||
if (process.argv.indexOf('--help') !== -1
|
||||
|| process.argv.indexOf('-h') !== -1) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
process.title = 'lcoin';
|
||||
process.title = 'fcoin';
|
||||
|
||||
const assert = require('assert');
|
||||
const SPVNode = require('../lib/node/spvnode');
|
||||
|
||||
@ -12,7 +12,7 @@ const worker = fs.readFileSync(`${__dirname}/bcoin-worker.js`);
|
||||
|
||||
const proxy = new WSProxy({
|
||||
pow: process.argv.indexOf('--pow') !== -1,
|
||||
ports: [9333, 19335, 19444, 28333, 28901]
|
||||
ports: [7312, 17312, 17412, 28333, 28901]
|
||||
});
|
||||
|
||||
const server = new HTTPBase({
|
||||
|
||||
@ -98,7 +98,7 @@ URI.prototype.fromString = function fromString(str, network) {
|
||||
|
||||
const prefix = str.substring(0, 8);
|
||||
|
||||
assert(prefix === 'litecoin:', 'Not a bitcoin URI.');
|
||||
assert(prefix === 'flo:', 'Not a bitcoin URI.');
|
||||
|
||||
str = str.substring(8);
|
||||
|
||||
@ -154,7 +154,7 @@ URI.fromString = function fromString(str, network) {
|
||||
*/
|
||||
|
||||
URI.prototype.toString = function toString() {
|
||||
let str = 'litecoin:';
|
||||
let str = 'flo:';
|
||||
|
||||
str += this.address.toString();
|
||||
|
||||
|
||||
@ -1,224 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = [
|
||||
'5.39.64.7:9333',
|
||||
'5.45.69.13:9333',
|
||||
'5.100.249.197:9333',
|
||||
'5.228.7.146:9333',
|
||||
'5.255.90.234:9333',
|
||||
'23.28.128.65:9333',
|
||||
'23.94.28.182:9335',
|
||||
'23.236.100.11:9333',
|
||||
'24.214.54.179:10333',
|
||||
'24.220.158.151:9333',
|
||||
'27.96.51.15:9333',
|
||||
'31.131.20.85:9333',
|
||||
'31.165.50.156:9333',
|
||||
'34.193.68.10:9333',
|
||||
'37.24.124.177:9333',
|
||||
'37.61.209.144:9333',
|
||||
'37.143.8.102:28333',
|
||||
'37.157.183.16:9333',
|
||||
'37.221.198.57:9333',
|
||||
'42.51.12.220:9333',
|
||||
'42.51.153.80:8332',
|
||||
'45.55.176.26:9333',
|
||||
'45.63.93.75:9333',
|
||||
'45.76.172.211:9333',
|
||||
'46.23.85.25:9333',
|
||||
'46.32.50.98:9333',
|
||||
'46.166.129.186:9333',
|
||||
'47.54.207.91:9333',
|
||||
'47.55.95.227:9333',
|
||||
'47.88.152.141:9333',
|
||||
'47.90.120.157:9333',
|
||||
'47.93.132.3:9333',
|
||||
'47.187.16.175:9333',
|
||||
'51.7.77.185:9333',
|
||||
'51.15.64.166:9333',
|
||||
'52.7.135.69:9333',
|
||||
'52.63.12.109:9333',
|
||||
'54.149.206.22:18891',
|
||||
'62.106.16.111:9333',
|
||||
'62.106.27.219:9333',
|
||||
'62.112.11.188:9333',
|
||||
'62.152.54.44:9333',
|
||||
'62.232.136.243:9333',
|
||||
'63.224.55.74:9333',
|
||||
'63.231.239.212:9333',
|
||||
'65.70.19.49:9333',
|
||||
'66.172.104.80:9333',
|
||||
'66.196.5.33:9333',
|
||||
'68.63.8.36:9333',
|
||||
'69.175.49.226:9333',
|
||||
'71.120.188.82:9333',
|
||||
'72.135.235.246:9333',
|
||||
'72.180.107.193:9333',
|
||||
'74.77.80.44:9333',
|
||||
'76.12.247.45:9333',
|
||||
'76.92.136.75:9333',
|
||||
'76.169.57.92:9333',
|
||||
'77.77.46.250:9333',
|
||||
'78.31.66.170:9333',
|
||||
'78.58.154.22:9333',
|
||||
'78.158.132.14:9333',
|
||||
'80.237.235.101:9333',
|
||||
'80.237.240.102:9333',
|
||||
'81.4.103.48:9333',
|
||||
'81.27.96.37:9333',
|
||||
'82.192.64.136:9333',
|
||||
'82.208.99.13:9333',
|
||||
'83.78.230.30:9333',
|
||||
'83.83.0.100:9333',
|
||||
'83.162.196.192:9333',
|
||||
'83.212.97.34:9333',
|
||||
'84.50.242.136:9333',
|
||||
'84.215.80.43:9333',
|
||||
'84.234.52.190:37700',
|
||||
'85.21.144.163:9333',
|
||||
'85.21.144.226:9333',
|
||||
'85.25.74.148:9333',
|
||||
'85.25.138.71:9333',
|
||||
'85.105.196.209:9333',
|
||||
'85.143.137.206:9333',
|
||||
'85.194.238.130:9333',
|
||||
'85.234.150.199:9333',
|
||||
'86.14.143.176:9333',
|
||||
'87.79.94.221:9333',
|
||||
'87.236.27.155:9333',
|
||||
'88.84.24.206:10333',
|
||||
'88.87.78.126:9333',
|
||||
'88.196.136.31:9333',
|
||||
'88.202.202.221:9333',
|
||||
'88.208.3.82:9333',
|
||||
'89.22.104.48:9333',
|
||||
'89.22.151.211:9333',
|
||||
'89.98.140.88:9333',
|
||||
'89.212.75.6:9333',
|
||||
'89.252.28.26:9333',
|
||||
'90.177.48.104:9333',
|
||||
'91.109.112.90:9333',
|
||||
'91.109.112.94:9333',
|
||||
'91.152.121.68:9333',
|
||||
'91.205.217.142:9333',
|
||||
'91.226.10.90:9333',
|
||||
'91.228.155.63:9333',
|
||||
'91.240.141.175:9333',
|
||||
'93.100.51.48:9333',
|
||||
'93.190.140.198:9333',
|
||||
'94.31.170.49:9333',
|
||||
'95.174.101.14:9333',
|
||||
'95.211.138.88:9333',
|
||||
'95.213.143.13:9333',
|
||||
'95.213.210.141:9333',
|
||||
'96.42.248.149:9333',
|
||||
'96.127.175.194:9333',
|
||||
'97.81.152.130:9333',
|
||||
'97.107.188.177:9333',
|
||||
'101.100.174.138:9333',
|
||||
'103.3.188.189:9333',
|
||||
'103.7.32.40:9333',
|
||||
'103.80.168.57:9333',
|
||||
'103.82.56.25:9333',
|
||||
'103.250.4.74:41888',
|
||||
'104.35.96.255:9333',
|
||||
'107.150.45.210:9333',
|
||||
'107.155.133.230:9333',
|
||||
'107.182.235.53:9333',
|
||||
'107.197.216.228:9333',
|
||||
'108.59.7.214:9333',
|
||||
'108.59.9.14:9333',
|
||||
'109.61.102.5:9333',
|
||||
'109.111.178.187:10333',
|
||||
'109.169.71.17:9333',
|
||||
'109.201.183.125:9333',
|
||||
'119.9.116.68:9333',
|
||||
'119.28.61.201:9333',
|
||||
'119.28.70.144:9333',
|
||||
'121.14.154.49:9333',
|
||||
'121.42.184.8:9333',
|
||||
'123.1.170.46:9333',
|
||||
'124.190.12.86:9333',
|
||||
'130.240.22.202:9333',
|
||||
'134.119.179.234:9333',
|
||||
'139.59.180.15:9333',
|
||||
'139.162.57.21:9333',
|
||||
'140.186.42.44:9333',
|
||||
'142.4.208.32:9333',
|
||||
'143.89.111.111:9333',
|
||||
'144.76.40.144:9333',
|
||||
'144.172.71.138:9333',
|
||||
'148.251.44.134:9333',
|
||||
'155.4.15.52:9333',
|
||||
'155.207.60.48:9333',
|
||||
'158.129.212.251:9333',
|
||||
'162.213.252.46:9333',
|
||||
'162.221.12.116:10333',
|
||||
'166.70.94.106:9333',
|
||||
'169.44.34.88:9333',
|
||||
'171.25.221.40:9333',
|
||||
'173.51.177.2:9333',
|
||||
'173.79.196.160:9333',
|
||||
'173.80.190.86:9333',
|
||||
'173.209.44.34:9333',
|
||||
'173.255.204.124:9333',
|
||||
'174.49.248.188:9333',
|
||||
'178.15.158.237:9333',
|
||||
'178.20.55.234:9333',
|
||||
'178.155.51.54:9333',
|
||||
'178.238.225.168:9333',
|
||||
'183.111.10.67:9333',
|
||||
'184.164.147.82:21333',
|
||||
'185.8.165.150:10333',
|
||||
'185.21.223.231:9333',
|
||||
'185.50.213.124:9333',
|
||||
'185.103.243.133:9333',
|
||||
'185.106.122.192:9333',
|
||||
'185.141.24.127:9333',
|
||||
'185.163.125.67:9333',
|
||||
'185.194.140.155:9333',
|
||||
'188.182.109.216:9333',
|
||||
'188.214.30.138:9333',
|
||||
'190.112.242.178:9333',
|
||||
'191.101.236.222:9333',
|
||||
'192.3.165.30:9333',
|
||||
'192.187.116.242:9333',
|
||||
'193.33.170.127:9333',
|
||||
'193.46.80.101:9333',
|
||||
'193.58.196.212:9333',
|
||||
'193.146.41.46:9333',
|
||||
'194.24.182.27:9333',
|
||||
'194.63.143.197:9333',
|
||||
'194.79.8.36:10333',
|
||||
'194.79.8.37:10333',
|
||||
'194.135.88.142:9333',
|
||||
'195.3.254.48:9333',
|
||||
'195.132.61.82:9333',
|
||||
'195.166.157.97:9333',
|
||||
'195.169.138.2:9333',
|
||||
'195.225.230.28:10333',
|
||||
'198.48.216.49:9933',
|
||||
'198.98.48.192:9333',
|
||||
'199.204.185.218:9333',
|
||||
'204.111.241.195:9333',
|
||||
'209.41.186.78:9333',
|
||||
'209.73.142.226:9333',
|
||||
'209.126.107.166:9333',
|
||||
'210.56.60.26:9333',
|
||||
'211.22.29.34:19262',
|
||||
'211.149.161.104:9333',
|
||||
'211.149.224.234:9333',
|
||||
'212.1.101.68:10333',
|
||||
'212.47.252.13:9333',
|
||||
'212.93.226.90:9333',
|
||||
'212.160.237.44:9333',
|
||||
'213.136.71.143:9333',
|
||||
'216.164.138.13:9333',
|
||||
'217.20.130.72:9333',
|
||||
'217.112.251.21:9333',
|
||||
'218.161.47.61:9333',
|
||||
'219.113.244.52:9333',
|
||||
'219.117.248.55:9333',
|
||||
'221.141.3.12:9333',
|
||||
'221.141.3.26:9333',
|
||||
'192.99.12.221',
|
||||
'167.99.5.114',
|
||||
'192.99.6.117',
|
||||
'207.154.239.148',
|
||||
'176.31.106.35',
|
||||
'139.59.70.166',
|
||||
'128.199.116.119',
|
||||
'193.70.122.58',
|
||||
'192.241.201.19',
|
||||
'207.154.239.148',
|
||||
'128.199.116.119',
|
||||
'176.31.106.35',
|
||||
'192.81.223.212',
|
||||
'167.99.5.114'
|
||||
];
|
||||
|
||||
@ -1,17 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = [
|
||||
'45.33.107.92',
|
||||
'45.76.92.84',
|
||||
'47.93.81.84',
|
||||
'66.178.182.35',
|
||||
'78.47.34.228',
|
||||
'94.176.237.167',
|
||||
'98.234.65.112',
|
||||
'104.131.161.171',
|
||||
'104.236.211.206',
|
||||
'104.243.38.34',
|
||||
'108.61.195.151',
|
||||
'138.197.220.217',
|
||||
'173.209.44.34',
|
||||
'198.100.147.52'
|
||||
];
|
||||
|
||||
@ -32,12 +32,12 @@ function Node(options) {
|
||||
|
||||
AsyncObject.call(this);
|
||||
|
||||
this.config = new Config('lcoin');
|
||||
this.config = new Config('fcoin');
|
||||
this.config.inject(options);
|
||||
this.config.load(options);
|
||||
|
||||
if (options.config)
|
||||
this.config.open('lcoin.conf');
|
||||
this.config.open('fcoin.conf');
|
||||
|
||||
this.network = Network.get(this.config.network);
|
||||
this.startTime = -1;
|
||||
|
||||
@ -29,7 +29,7 @@ exports.COIN = 100000000;
|
||||
* @default
|
||||
*/
|
||||
|
||||
exports.MAX_MONEY = 84000000 * exports.COIN;
|
||||
exports.MAX_MONEY = 160000000 * exports.COIN;
|
||||
|
||||
/**
|
||||
* Base block subsidy (consensus).
|
||||
@ -41,7 +41,7 @@ exports.MAX_MONEY = 84000000 * exports.COIN;
|
||||
* @default
|
||||
*/
|
||||
|
||||
exports.BASE_REWARD = 50 * exports.COIN;
|
||||
exports.BASE_REWARD = 100 * exports.COIN;
|
||||
|
||||
/**
|
||||
* Half base block subsidy. Required to
|
||||
|
||||
@ -48,11 +48,11 @@ main.type = 'main';
|
||||
*/
|
||||
|
||||
main.seeds = [
|
||||
'seed-a.litecoin.loshan.co.uk',
|
||||
'dnsseed.thrasher.io',
|
||||
'dnsseed.litecointools.com',
|
||||
'dnsseed.litecoinpool.org',
|
||||
'dnsseed.koin-project.com'
|
||||
'seed1.florincoin.org',
|
||||
'node.oip.fun',
|
||||
'flodns.oip.li',
|
||||
'flodns.oip.fun',
|
||||
'flodns.seednode.net'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ main.seeds = [
|
||||
* @default
|
||||
*/
|
||||
|
||||
main.magic = 0xdbb6c0fb;
|
||||
main.magic = 0xfdc0a5f1;
|
||||
|
||||
/**
|
||||
* Default network port.
|
||||
@ -69,7 +69,7 @@ main.magic = 0xdbb6c0fb;
|
||||
* @default
|
||||
*/
|
||||
|
||||
main.port = 9333;
|
||||
main.port = 7312;
|
||||
|
||||
/**
|
||||
* Checkpoint block list.
|
||||
@ -77,22 +77,29 @@ main.port = 9333;
|
||||
*/
|
||||
|
||||
main.checkpointMap = {
|
||||
1500: '67299ab5a20244afc95e8376d48b5fe4545ad055a707a7cf88d25d9565291a84',
|
||||
4032: '4608cfd9e3d75f9687a935fd6ae2805b720335ce05595ef00efc9871420ee99c',
|
||||
8064: '700d4394a67d98b3fc29b7f0efeeb9baa4b8400c151f6510f29051fc534398eb',
|
||||
16128: '3d15cd1c2ae103ec4b7acd9d4d1ddc6fb66c0e9b1d9f80afa6f9b75918df2e60',
|
||||
23420: '07b501510bce8f974e87ec30258fa57d54fea9c30aa9b2d20bfd1aa89cdf0fd8',
|
||||
50000: 'a6207ad0713e2b2b88323a4fdb2a6727c11904cc2d01a575f0689b02eb37dc69',
|
||||
80000: '0ae9b2cd2e186748cbbe8c6ab420f9a85599a864c7493f5000a376f6027ccb4f',
|
||||
120000: '3161ac52357a6a021b12e7e9ce298e9ec88e82325f15f0a7daf6054f92269dbd',
|
||||
161500: '43ff718479f7bb8d41b8283b12914902dc1cba777c225cf7b44b4f478098e8db',
|
||||
179620: '09f7b9782b0ba55883b2dca7e969fa2fbed70f6e448ed12604c00a995cc6d92a',
|
||||
240000: 'aa885055a13e2eab6e4e0c59c439db739c4cf23676ee17a27c15c2b4c4d14071',
|
||||
383640: '64f3c626f1c396a090057d4be94ba32751a310f1b35ec6af5b21a994f009682b',
|
||||
409004: 'a3085935f1b439cfe9770edcfb67b682d974ad95931d6108faf1d963d6187548',
|
||||
456000: '0420375624e31b407dac0105a4a64ce397f822be060d9387d46c36c61cf734bf',
|
||||
638902: '384fc7ae3bc5ec5cc49ccd3d95fc9a81a5f3fc758c9ae28dd263ece856862315',
|
||||
721000: 'e540989a758adc4116743ee6a235b2ea14b7759dd93b46e27894dfe14d7b8a19'
|
||||
0: '09c7781c9df90708e278c35d38ea5c9041d7ecfcdd1c56ba67274b7cff3e1cea',
|
||||
8002: '73bc3b16d99bbf797f396c9532f80c3b73bb21304280de2efbc5edcb75739234',
|
||||
18001: '5a7a4821aa4fc7ee3dea2f8319e9fa4d991a8c6762e79cb624c64e4cf1031582',
|
||||
38002: '4962437c6d0a450f44c1e40cd38ff220f8122af1517e1329f1abd07fb7791e40',
|
||||
16002: '478d381c92298614c3a05fb934a4fffc4d3e5b573efbba9b3e8b2ce8d26a0f8f',
|
||||
208001: '2bb3f8b2d5081aefa0af9f5d8de42bd73a5d89eebf78aa7421cd63dc40a56d4c',
|
||||
270001: '74988a3179ae6bbc5986e63f71bafc855202502b07e4d9331015eee82df80860',
|
||||
290036: '145994381e5e4f0e5674adc1ace9a03b670838792f6bd6b650c80466453c2da3',
|
||||
344665: '40fe36d8dec357aa529b6b1d99b2989a37ed8c7b065a0e3345cd15a751b9c1ad',
|
||||
400236: 'f9a4b8e21d410539e45ff3f11c28dee8966de7edffc45fd02dd1a5f4e7d4ef38'
|
||||
415000: '16ef8ab98a7300039a5755d5bdc00e31dada9d2f1c440ff7928f43c4ea41c0a8',
|
||||
420937: '48a75e4687021ec0dda2031439de50b61933e197a4e1a1185d131cc2b59b8444',
|
||||
425606: '62c8d811b1a49f6fdaffded704dc48b1c98d6f8dd736d8afb96c9b097774a85e',
|
||||
508694: '65cde197e9118e5164c4dcdcdc6fcfaf8c0de605d569cefd56aa220e7739da6a',
|
||||
696454: '8cfb75684405e22f8f69522ec11f1e5206758e37f25db13880548f69fe6f1976',
|
||||
955000: 'b5517a50aee6af59eb0ab4ee3262bcbaf3f6672b9301cdd3302e4bab491e7526',
|
||||
1505017: 'd38b306850bb26a5c98400df747d4391bb4e359e95e20dc79b50063ed3c5bfa7',
|
||||
1678879: '1e874e2852e8dfb3553f0e6c02dcf70e9f5697effa31385d25a3c88fe26676fc',
|
||||
1678909: '4c5a1040e337a542e6717904c8346bd72151fc34c390dff7b5cf23dcedc5058a',
|
||||
1679162: 'b32c64fb80a4196ff3e1be883db10629e1d7cd27c00ef0b5d1fe54af481fc10f',
|
||||
1796633: 'c2da8b936a7f2c0de02aa0c6c45f3d971ebad78655255a945b0e60b62f27d445',
|
||||
2094558: '946616c88286f32bfac15868456d87a86f8611e1f9b56594b81e46831ce43f81',
|
||||
2532181: 'cacd5149aaed1088ae1db997a741210b0525e941356104120f182f3159931c79'
|
||||
};
|
||||
|
||||
/**
|
||||
@ -101,14 +108,14 @@ main.checkpointMap = {
|
||||
* @default
|
||||
*/
|
||||
|
||||
main.lastCheckpoint = 721000;
|
||||
main.lastCheckpoint = 2532181;
|
||||
|
||||
/**
|
||||
* @const {Number}
|
||||
* @default
|
||||
*/
|
||||
|
||||
main.halvingInterval = 840000;
|
||||
main.halvingInterval = 800000;
|
||||
|
||||
/**
|
||||
* Genesis block header.
|
||||
@ -117,12 +124,12 @@ main.halvingInterval = 840000;
|
||||
|
||||
main.genesis = {
|
||||
version: 1,
|
||||
hash: 'e2bf047e7e5a191aa4ef34d314979dc9986e0f19251edaba5940fd1fe365a712',
|
||||
hash: '09c7781c9df90708e278c35d38ea5c9041d7ecfcdd1c56ba67274b7cff3e1cea',
|
||||
prevBlock: '0000000000000000000000000000000000000000000000000000000000000000',
|
||||
merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97',
|
||||
time: 1317972665,
|
||||
merkleRoot: '730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300',
|
||||
time: 1371488396,
|
||||
bits: 504365040, // 0x1e0ffff0
|
||||
nonce: 2084524493,
|
||||
nonce: 1000112548,
|
||||
height: 0
|
||||
};
|
||||
|
||||
@ -133,13 +140,14 @@ main.genesis = {
|
||||
|
||||
main.genesisBlock =
|
||||
'0100000000000000000000000000000000000000000000000000000000000000000000'
|
||||
+ '00d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97b9aa'
|
||||
+ '8e4ef0ff0f1ecd513f7c01010000000100000000000000000000000000000000000000'
|
||||
+ '00000000000000000000000000ffffffff4804ffff001d0104404e592054696d657320'
|
||||
+ '30352f4f63742f32303131205374657665204a6f62732c204170706c65e28099732056'
|
||||
+ '6973696f6e6172792c2044696573206174203536ffffffff0100f2052a010000004341'
|
||||
+ '040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4'
|
||||
+ 'd4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac00000000';
|
||||
+ '0000232baba7291c9d844bb24867aafe453ea7e290685612552d595adc8d0c0f738c40'
|
||||
+ 'bf51f0ff0f1ea4819c3b01020000000100000000000000000000000000000000000000'
|
||||
+ '00000000000000000000000000ffffffff4904ffff001d010441536c617368646f7420'
|
||||
+ '2d203137204a756e652032303133202d20536175646920417261626961205365742054'
|
||||
+ '6f2042616e2057686174734170702c20536b797065ffffffff0100e40b540200000043'
|
||||
+ '41040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10'
|
||||
+ 'f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac000000'
|
||||
+ '001d746578743a466c6f72696e636f696e2067656e6573697320626c6f636b';
|
||||
|
||||
/**
|
||||
* POW-related constants.
|
||||
@ -172,7 +180,7 @@ main.pow = {
|
||||
*/
|
||||
|
||||
chainwork: new BN(
|
||||
'00000000000000000000000000000000000000000000000ba50a60f8b56c7fe0',
|
||||
'00000000000000000000000000000000000000000000000011f1db4843f05806',
|
||||
'hex'
|
||||
),
|
||||
|
||||
@ -190,7 +198,7 @@ main.pow = {
|
||||
* @default
|
||||
*/
|
||||
|
||||
targetSpacing: 2.5 * 60,
|
||||
targetSpacing: 40,
|
||||
|
||||
/**
|
||||
* Retarget interval in blocks.
|
||||
@ -230,37 +238,37 @@ main.block = {
|
||||
* Used for avoiding bip30 checks.
|
||||
*/
|
||||
|
||||
bip34height: 710000,
|
||||
bip34height: 1679161,
|
||||
|
||||
/**
|
||||
* Hash of the block that activated bip34.
|
||||
*/
|
||||
|
||||
bip34hash: 'cf519deb9a32b4c72612ff0c42bf3a04f262fa41d4c8a7d58e763aa804d209fa',
|
||||
bip34hash: '490a10507efe42b89104408787088b7c43310cc230310201b5f57dac6f513b8b',
|
||||
|
||||
/**
|
||||
* Height at which bip65 was activated.
|
||||
*/
|
||||
|
||||
bip65height: 918684,
|
||||
bip65height: 1679161,
|
||||
|
||||
/**
|
||||
* Hash of the block that activated bip65.
|
||||
*/
|
||||
|
||||
bip65hash: '1a31cc64827cc248b2afefd849d41dde2bb907e73ff6ef3edce077891e04b3ba',
|
||||
bip65hash: '490a10507efe42b89104408787088b7c43310cc230310201b5f57dac6f513b8b',
|
||||
|
||||
/**
|
||||
* Height at which bip66 was activated.
|
||||
*/
|
||||
|
||||
bip66height: 811879,
|
||||
bip66height: 1679161,
|
||||
|
||||
/**
|
||||
* Hash of the block that activated bip66.
|
||||
*/
|
||||
|
||||
bip66hash: '941849dc7bbdd271a727db8fb06acd33e23a1b8b5d83f85289fa332801eece7a',
|
||||
bip66hash: '490a10507efe42b89104408787088b7c43310cc230310201b5f57dac6f513b8b',
|
||||
|
||||
/**
|
||||
* Safe height to start pruning.
|
||||
@ -325,8 +333,8 @@ main.deployments = {
|
||||
csv: {
|
||||
name: 'csv',
|
||||
bit: 0,
|
||||
startTime: 1485561600, // January 28, 2017
|
||||
timeout: 1517356801, // January 31st, 2018
|
||||
startTime: 1522562766, // April 1st, 2018
|
||||
timeout: 1554098766, // April 1st, 2019
|
||||
threshold: -1,
|
||||
window: -1,
|
||||
required: false,
|
||||
@ -335,8 +343,8 @@ main.deployments = {
|
||||
segwit: {
|
||||
name: 'segwit',
|
||||
bit: 1,
|
||||
startTime: 1485561600, // January 28, 2017
|
||||
timeout: 1517356801, // January 31st, 2018
|
||||
startTime: 1522562766, // April 1st, 2018
|
||||
timeout: 1554098766, // April 1st, 2019
|
||||
threshold: -1,
|
||||
window: -1,
|
||||
required: true,
|
||||
@ -373,11 +381,11 @@ main.deploys = [
|
||||
*/
|
||||
|
||||
main.keyPrefix = {
|
||||
privkey: 0xb0,
|
||||
xpubkey: 0x0488b21e,
|
||||
xprivkey: 0x0488ade4,
|
||||
xpubkey58: 'xpub',
|
||||
xprivkey58: 'xprv',
|
||||
privkey: 163,
|
||||
xpubkey: 0x0134406b,
|
||||
xprivkey: 0x01343c31,
|
||||
xpubkey58: 'Fpub',
|
||||
xprivkey58: 'Fprv',
|
||||
coinType: 0
|
||||
};
|
||||
|
||||
@ -387,12 +395,12 @@ main.keyPrefix = {
|
||||
*/
|
||||
|
||||
main.addressPrefix = {
|
||||
pubkeyhash: 0x30,
|
||||
scripthash: 0x05,
|
||||
scripthash2: 0x32,
|
||||
pubkeyhash: 35,
|
||||
scripthash: 8,
|
||||
scripthash2: 94,
|
||||
witnesspubkeyhash: 0x06,
|
||||
witnessscripthash: 0x0a,
|
||||
bech32: 'ltc'
|
||||
bech32: 'flo'
|
||||
};
|
||||
|
||||
/**
|
||||
@ -410,7 +418,7 @@ main.requireStandard = true;
|
||||
* @default
|
||||
*/
|
||||
|
||||
main.rpcPort = 9332;
|
||||
main.rpcPort = 7312;
|
||||
|
||||
/**
|
||||
* Default min relay rate.
|
||||
@ -460,14 +468,12 @@ const testnet = {};
|
||||
testnet.type = 'testnet';
|
||||
|
||||
testnet.seeds = [
|
||||
'testnet-seed.litecointools.com',
|
||||
'seed-b.litecoin.loshan.co.uk',
|
||||
'dnsseed-testnet.thrasher.io'
|
||||
'testnet.oip.fun'
|
||||
];
|
||||
|
||||
testnet.magic = 0xf1c8d2fd;
|
||||
testnet.magic = 0xfdc05af2;
|
||||
|
||||
testnet.port = 19335;
|
||||
testnet.port = 17312;
|
||||
|
||||
testnet.checkpointMap = {
|
||||
2056: '8932a8789c96c516d8a1080a29c7e7e387d2397a83864f9adcaf97ba318a7417',
|
||||
@ -479,25 +485,25 @@ testnet.halvingInterval = 840000;
|
||||
|
||||
testnet.genesis = {
|
||||
version: 1,
|
||||
hash: 'a0293e4eeb3da6e6f56f81ed595f57880d1a21569e13eefdd951284b5a626649',
|
||||
hash: '9b7bc86236c34b5e3a39367c036b7fe8807a966c22a7a1f0da2a198a27e03731',
|
||||
prevBlock: '0000000000000000000000000000000000000000000000000000000000000000',
|
||||
merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97',
|
||||
time: 1486949366,
|
||||
merkleRoot: '730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300',
|
||||
time: 1371387277,
|
||||
bits: 504365040,
|
||||
nonce: 293345,
|
||||
nonce: 1000580675,
|
||||
height: 0
|
||||
};
|
||||
|
||||
testnet.genesisBlock =
|
||||
'010000000000000000000000000000000000000000000000000000000000000000000'
|
||||
+ '000d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97f6'
|
||||
+ '0ba158f0ff0f1ee179040001010000000100000000000000000000000000000000000'
|
||||
+ '00000000000000000000000000000ffffffff4804ffff001d0104404e592054696d65'
|
||||
+ '732030352f4f63742f32303131205374657665204a6f62732c204170706c65e280997'
|
||||
+ '320566973696f6e6172792c2044696573206174203536ffffffff0100f2052a010000'
|
||||
+ '004341040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3e'
|
||||
+ 'b4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac'
|
||||
+ '00000000';
|
||||
+ '00000232baba7291c9d844bb24867aafe453ea7e290685612552d595adc8d0c0f738d'
|
||||
+ 'b5bd51f0ff0f1e43a6a33b01020000000100000000000000000000000000000000000'
|
||||
+ '00000000000000000000000000000ffffffff4904ffff001d010441536c617368646f'
|
||||
+ '74202d203137204a756e652032303133202d205361756469204172616269612053657'
|
||||
+ '420546f2042616e2057686174734170702c20536b797065ffffffff0100e40b540200'
|
||||
+ '00004341040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d'
|
||||
+ '3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9'
|
||||
+ 'ac000000001d746578743a466c6f72696e636f696e2067656e6573697320626c6f636b';
|
||||
|
||||
testnet.pow = {
|
||||
limit: new BN(
|
||||
@ -506,23 +512,23 @@ testnet.pow = {
|
||||
),
|
||||
bits: 504365055,
|
||||
chainwork: new BN(
|
||||
'0000000000000000000000000000000000000000000000000000364b0cbc3568',
|
||||
'000000000000000000000000000000000000000000000000000000083540886d',
|
||||
'hex'
|
||||
),
|
||||
targetTimespan: 3.5 * 24 * 60 * 60,
|
||||
targetSpacing: 2.5 * 60,
|
||||
retargetInterval: 2016,
|
||||
targetSpacing: 40,
|
||||
retargetInterval: 1,
|
||||
targetReset: true,
|
||||
noRetargeting: false
|
||||
};
|
||||
|
||||
testnet.block = {
|
||||
bip34height: 76,
|
||||
bip34hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580',
|
||||
bip65height: 76,
|
||||
bip65hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580',
|
||||
bip66height: 76,
|
||||
bip66hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580',
|
||||
bip34height: 33600,
|
||||
bip34hash: '4ac31d938531317c065405a9b23478c8c99204ff17fc294cb09821e2c2b42e65',
|
||||
bip65height: 33600,
|
||||
bip65hash: '4ac31d938531317c065405a9b23478c8c99204ff17fc294cb09821e2c2b42e65',
|
||||
bip66height: 33600,
|
||||
bip66hash: '4ac31d938531317c065405a9b23478c8c99204ff17fc294cb09821e2c2b42e65',
|
||||
pruneAfterHeight: 1000,
|
||||
keepBlocks: 10000,
|
||||
maxTipAge: 24 * 60 * 60,
|
||||
@ -539,8 +545,8 @@ testnet.deployments = {
|
||||
csv: {
|
||||
name: 'csv',
|
||||
bit: 0,
|
||||
startTime: 1483228800, // March 1st, 2016
|
||||
timeout: 1517356801, // May 1st, 2017
|
||||
startTime: 1483228800, // January 1, 2017
|
||||
timeout: 1530446401, // July 1, 2018
|
||||
threshold: -1,
|
||||
window: -1,
|
||||
required: false,
|
||||
@ -549,8 +555,8 @@ testnet.deployments = {
|
||||
segwit: {
|
||||
name: 'segwit',
|
||||
bit: 1,
|
||||
startTime: 1483228800, // May 1st 2016
|
||||
timeout: 1517356801, // May 1st 2017
|
||||
startTime: 1483228800, // January 1, 2017
|
||||
timeout: 1530446401, // July 1, 2018
|
||||
threshold: -1,
|
||||
window: -1,
|
||||
required: true,
|
||||
@ -575,26 +581,26 @@ testnet.deploys = [
|
||||
];
|
||||
|
||||
testnet.keyPrefix = {
|
||||
privkey: 0xef,
|
||||
xpubkey: 0x043587cf,
|
||||
xprivkey: 0x04358394,
|
||||
xpubkey58: 'xpub',
|
||||
xprivkey58: 'xprv',
|
||||
privkey: 239,
|
||||
xpubkey: 0x013440e2,
|
||||
xprivkey: 0x01343c23,
|
||||
xpubkey58: 'Fput',
|
||||
xprivkey58: 'Fprt',
|
||||
coinType: 1
|
||||
};
|
||||
|
||||
testnet.addressPrefix = {
|
||||
pubkeyhash: 0x6f,
|
||||
scripthash: 0xc4,
|
||||
scripthash2: 0x3a,
|
||||
pubkeyhash: 115,
|
||||
scripthash: 198,
|
||||
scripthash2: 58,
|
||||
witnesspubkeyhash: 0x03,
|
||||
witnessscripthash: 0x28,
|
||||
bech32: 'tltc'
|
||||
bech32: 'tflo'
|
||||
};
|
||||
|
||||
testnet.requireStandard = false;
|
||||
|
||||
testnet.rpcPort = 19332;
|
||||
testnet.rpcPort = 17312;
|
||||
|
||||
testnet.minRelay = 1000;
|
||||
|
||||
@ -618,9 +624,9 @@ regtest.seeds = [
|
||||
'127.0.0.1'
|
||||
];
|
||||
|
||||
regtest.magic = 0xdab5bffa;
|
||||
regtest.magic = 0xfabfb5da;
|
||||
|
||||
regtest.port = 19444;
|
||||
regtest.port = 17412;
|
||||
|
||||
regtest.checkpointMap = {};
|
||||
regtest.lastCheckpoint = 0;
|
||||
@ -629,15 +635,16 @@ regtest.halvingInterval = 150;
|
||||
|
||||
regtest.genesis = {
|
||||
version: 1,
|
||||
hash: 'f916c456fc51df627885d7d674ed02dc88a225adb3f02ad13eb4938ff3270853',
|
||||
hash: 'ec42fa26ca6dcb1103b59a1d24b161935ea4566f8d5736db8917d5b9a8dee0d7',
|
||||
prevBlock: '0000000000000000000000000000000000000000000000000000000000000000',
|
||||
merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97',
|
||||
time: 1296688602,
|
||||
merkleRoot: '730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300',
|
||||
time: 1371387277,
|
||||
bits: 545259519,
|
||||
nonce: 0,
|
||||
height: 0
|
||||
};
|
||||
|
||||
// @TODO: Add Genesis Block hex for Flo Regtest
|
||||
regtest.genesisBlock =
|
||||
'010000000000000000000000000000000000000000000000000000000000000000000'
|
||||
+ '000d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97da'
|
||||
@ -660,7 +667,7 @@ regtest.pow = {
|
||||
'hex'
|
||||
),
|
||||
targetTimespan: 3.5 * 24 * 60 * 60,
|
||||
targetSpacing: 2.5 * 60,
|
||||
targetSpacing: 40,
|
||||
retargetInterval: 2016,
|
||||
targetReset: true,
|
||||
noRetargeting: true
|
||||
|
||||
@ -25,7 +25,7 @@ const server = exports;
|
||||
*/
|
||||
|
||||
server.create = function create(options) {
|
||||
const config = new Config('lcoin');
|
||||
const config = new Config('fcoin');
|
||||
let logger = new Logger('debug');
|
||||
|
||||
config.inject(options);
|
||||
|
||||
23
package.json
23
package.json
@ -1,20 +1,25 @@
|
||||
{
|
||||
"name": "lcoin",
|
||||
"name": "fcoin",
|
||||
"version": "1.0.0-beta.15",
|
||||
"description": "Litecoin bike-shed",
|
||||
"description": "Flo bike-shed",
|
||||
"license": "MIT",
|
||||
"repository": "git://github.com/bcoin-org/lcoin.git",
|
||||
"homepage": "https://github.com/bcoin-org/lcoin",
|
||||
"repository": "git://github.com/oipwg/fcoin.git",
|
||||
"homepage": "https://github.com/oipwg/fcoin",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bcoin-org/lcoin/issues"
|
||||
"url": "https://github.com/oipwg/fcoin/issues"
|
||||
},
|
||||
"author": "Fedor Indutny <fedor@indutny.com>",
|
||||
"contributors": [
|
||||
"Christopher Jeffrey <chjjeffrey@gmail.com>"
|
||||
"Sky Young <sky@alexandria.io>"
|
||||
],
|
||||
"keywords": [
|
||||
"bcoin",
|
||||
"lcoin",
|
||||
"fcoin",
|
||||
"bitcoin",
|
||||
"litecoin",
|
||||
"flo",
|
||||
"blockchain",
|
||||
"cryptocurrency",
|
||||
"wallet"
|
||||
@ -53,10 +58,10 @@
|
||||
},
|
||||
"main": "./lib/bcoin.js",
|
||||
"bin": {
|
||||
"lcoin": "./bin/lcoin",
|
||||
"lcoin-cli": "./bin/cli",
|
||||
"lcoin-node": "./bin/node",
|
||||
"lcoin-spvnode": "./bin/spvnode"
|
||||
"fcoin": "./bin/fcoin",
|
||||
"fcoin-cli": "./bin/cli",
|
||||
"fcoin-node": "./bin/node",
|
||||
"fcoin-spvnode": "./bin/spvnode"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -f {browser/,}{bcoin.js,bcoin-worker.js}",
|
||||
|
||||
@ -66,33 +66,36 @@ function createGenesisBlock(options) {
|
||||
|
||||
const main = createGenesisBlock({
|
||||
version: 1,
|
||||
time: 1317972665,
|
||||
time: 1371488396,
|
||||
bits: 504365040,
|
||||
nonce: 2084524493,
|
||||
nonce: 1000112548,
|
||||
strFloData: "text:Florincoin genesis block",
|
||||
flags: Buffer.from(
|
||||
'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56',
|
||||
'Slashdot - 17 June 2013 - Saudi Arabia Set To Ban WhatsApp, Skype',
|
||||
'ascii'),
|
||||
key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex')
|
||||
});
|
||||
|
||||
const testnet = createGenesisBlock({
|
||||
version: 1,
|
||||
time: 1486949366,
|
||||
time: 1371387277,
|
||||
bits: 0x1e0ffff0,
|
||||
nonce: 293345,
|
||||
nonce: 1000580675,
|
||||
strFloData: "text:Florincoin genesis block",
|
||||
flags: Buffer.from(
|
||||
'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56',
|
||||
'Slashdot - 17 June 2013 - Saudi Arabia Set To Ban WhatsApp, Skype',
|
||||
'ascii'),
|
||||
key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex')
|
||||
});
|
||||
|
||||
const regtest = createGenesisBlock({
|
||||
version: 1,
|
||||
time: 1296688602,
|
||||
time: 1371387277,
|
||||
bits: 0x207fffff,
|
||||
nonce: 0,
|
||||
strFloData: "text:Florincoin genesis block",
|
||||
flags: Buffer.from(
|
||||
'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56',
|
||||
'Slashdot - 17 June 2013 - Saudi Arabia Set To Ban WhatsApp, Skype',
|
||||
'ascii'),
|
||||
key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex')
|
||||
});
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
dir=$(dirname "$(which "$0")")
|
||||
url_main='https://raw.githubusercontent.com/litecoin-project/litecoin/master/contrib/seeds/nodes_main.txt'
|
||||
url_testnet='https://raw.githubusercontent.com/litecoin-project/litecoin/master/contrib/seeds/nodes_test.txt'
|
||||
url_main='https://raw.githubusercontent.com/floblockchain/flo/flo-master/contrib/seeds/nodes_main.txt'
|
||||
url_testnet='https://raw.githubusercontent.com/floblockchain/flo/flo-master/contrib/seeds/nodes_test.txt'
|
||||
|
||||
getseeds() {
|
||||
echo "$(curl -s "$1")"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user