diff --git a/package-lock.json b/package-lock.json index fb6fd6d..2c26b1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.3.0", "license": "MIT", "dependencies": { - "@knuth/bch-native": "^1.1.0", + "@knuth/bch-native": "^1.3.0", "bluebird": "^3.7.2", "memoizee": "^0.4.14" }, @@ -1136,9 +1136,9 @@ "dev": true }, "node_modules/@knuth/bch-native": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@knuth/bch-native/-/bch-native-1.1.0.tgz", - "integrity": "sha512-WqMfotqOzrRt6enf+BUMeVEcAzejru8PBJuBRkduPtb5IR2Mz/LxOcMUnBctqPRj9WCoBpDSBxypzYe+JfEgJA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@knuth/bch-native/-/bch-native-1.3.0.tgz", + "integrity": "sha512-MMxQWREuG8b7V4nKGXau6HZ9K/BlwwrrCXPBemPsl4iRJMnJGBuX4F8mZpfL7Ycn2UzxIo6ZJNvJvIW/+to9yA==", "hasInstallScript": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.11", @@ -9915,9 +9915,9 @@ } }, "@knuth/bch-native": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@knuth/bch-native/-/bch-native-1.1.0.tgz", - "integrity": "sha512-WqMfotqOzrRt6enf+BUMeVEcAzejru8PBJuBRkduPtb5IR2Mz/LxOcMUnBctqPRj9WCoBpDSBxypzYe+JfEgJA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@knuth/bch-native/-/bch-native-1.3.0.tgz", + "integrity": "sha512-MMxQWREuG8b7V4nKGXau6HZ9K/BlwwrrCXPBemPsl4iRJMnJGBuX4F8mZpfL7Ycn2UzxIo6ZJNvJvIW/+to9yA==", "requires": { "@mapbox/node-pre-gyp": "^1.0.11", "nan": "^2.17.0" diff --git a/package.json b/package.json index 7c11f4b..d6a5fc9 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "homepage": "https://github.com/k-nuth/js-api#readme", "dependencies": { "bluebird": "^3.7.2", - "@knuth/bch-native": "^1.1.0", + "@knuth/bch-native": "^1.3.0", "memoizee": "^0.4.14" }, "devDependencies": { diff --git a/src/config/settings.d.ts b/src/config/settings.d.ts index 00522da..469db74 100644 --- a/src/config/settings.d.ts +++ b/src/config/settings.d.ts @@ -63,9 +63,10 @@ export interface BlockchainSettings { bchEuler: boolean; bchGauss: boolean; bchDescartes: boolean; + bchLobachevski: boolean; - lobachevskiActivationTime: number; galoisActivationTime: number; + leibnizActivationTime: number; asertHalfLife: number; } diff --git a/test/config/blockchainSettings.test.js b/test/config/blockchainSettings.test.js index 5acd9c9..0975883 100644 --- a/test/config/blockchainSettings.test.js +++ b/test/config/blockchainSettings.test.js @@ -13,7 +13,7 @@ test('read default mainnet settings', () => { expect(settings.notifyLimitHours).toBe(24); expect(settings.reorganizationLimit).toBe(256); - expect(settings.checkpoints.length).toBe(76); + expect(settings.checkpoints.length).toBe(79); expect(settings.checkpoints[0].height).toBe(0); expect(enc.Hash.bytesToStr(settings.checkpoints[0].hash)).toBe( '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f' @@ -42,9 +42,10 @@ test('read default mainnet settings', () => { expect(settings.bchEuler).toBe(true); expect(settings.bchGauss).toBe(true); expect(settings.bchDescartes).toBe(true); + expect(settings.bchLobachevski).toBe(true); - expect(settings.lobachevskiActivationTime).toBe(1715774400); expect(settings.galoisActivationTime).toBe(1747310400); + expect(settings.leibnizActivationTime).toBe(1778846400); expect(settings.asertHalfLife).toBe(2 * 24 * 60 * 60); //two days }); @@ -89,9 +90,10 @@ test('read default testnet4 settings', () => { expect(settings.bchEuler).toBe(true); expect(settings.bchGauss).toBe(true); expect(settings.bchDescartes).toBe(true); + expect(settings.bchLobachevski).toBe(true); - expect(settings.lobachevskiActivationTime).toBe(1715774400); expect(settings.galoisActivationTime).toBe(1747310400); + expect(settings.leibnizActivationTime).toBe(1778846400); expect(settings.asertHalfLife).toBe(60 * 60); //one hour }); @@ -107,7 +109,7 @@ test('read default chipnet settings', () => { expect(settings.notifyLimitHours).toBe(24); expect(settings.reorganizationLimit).toBe(256); - expect(settings.checkpoints.length).toBe(12); + expect(settings.checkpoints.length).toBe(14); expect(settings.checkpoints[0].height).toBe(0); expect(enc.Hash.bytesToStr(settings.checkpoints[0].hash)).toBe( '000000001dd410c49a788668ce26751718cc797474d3152a5fc073dd44fd9f7b' @@ -136,9 +138,10 @@ test('read default chipnet settings', () => { expect(settings.bchEuler).toBe(true); expect(settings.bchGauss).toBe(true); expect(settings.bchDescartes).toBe(true); + expect(settings.bchLobachevski).toBe(true); - expect(settings.lobachevskiActivationTime).toBe(1715774400); expect(settings.galoisActivationTime).toBe(1747310400); + expect(settings.leibnizActivationTime).toBe(1778846400); expect(settings.asertHalfLife).toBe(60 * 60); //one hour }); diff --git a/test/config/settings.test.js b/test/config/settings.test.js index c37b4f1..8364e27 100644 --- a/test/config/settings.test.js +++ b/test/config/settings.test.js @@ -13,7 +13,7 @@ test('read default mainnet settings', () => { expect(setts.chain.minimumOutputSatoshis).toBe(500); expect(setts.chain.notifyLimitHours).toBe(24); expect(setts.chain.reorganizationLimit).toBe(256); - expect(setts.chain.checkpoints.length).toBe(76); + expect(setts.chain.checkpoints.length).toBe(79); expect(setts.chain.checkpoints[0].height).toBe(0); expect(enc.Hash.bytesToStr(setts.chain.checkpoints[0].hash)).toBe( '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f' @@ -41,9 +41,10 @@ test('read default mainnet settings', () => { expect(setts.chain.bchEuler).toBe(true); expect(setts.chain.bchGauss).toBe(true); expect(setts.chain.bchDescartes).toBe(true); + expect(setts.chain.bchLobachevski).toBe(true); - expect(setts.chain.lobachevskiActivationTime).toBe(1715774400); expect(setts.chain.galoisActivationTime).toBe(1747310400); + expect(setts.chain.leibnizActivationTime).toBe(1778846400); expect(setts.chain.asertHalfLife).toBe(2 * 24 * 60 * 60); //two days // ------------------------------------------------------------------------------------ @@ -147,9 +148,10 @@ test('read default testnet4 settings', () => { expect(setts.chain.bchEuler).toBe(true); expect(setts.chain.bchGauss).toBe(true); expect(setts.chain.bchDescartes).toBe(true); + expect(setts.chain.bchLobachevski).toBe(true); - expect(setts.chain.lobachevskiActivationTime).toBe(1715774400); expect(setts.chain.galoisActivationTime).toBe(1747310400); + expect(setts.chain.leibnizActivationTime).toBe(1778846400); expect(setts.chain.asertHalfLife).toBe(60 * 60); // one hour // ------------------------------------------------------------------------------------ @@ -224,7 +226,7 @@ test('read default chipnet settings', () => { expect(setts.chain.minimumOutputSatoshis).toBe(500); expect(setts.chain.notifyLimitHours).toBe(24); expect(setts.chain.reorganizationLimit).toBe(256); - expect(setts.chain.checkpoints.length).toBe(12); + expect(setts.chain.checkpoints.length).toBe(14); expect(setts.chain.checkpoints[0].height).toBe(0); expect(enc.Hash.bytesToStr(setts.chain.checkpoints[0].hash)).toBe( '000000001dd410c49a788668ce26751718cc797474d3152a5fc073dd44fd9f7b' @@ -252,9 +254,10 @@ test('read default chipnet settings', () => { expect(setts.chain.bchEuler).toBe(true); expect(setts.chain.bchGauss).toBe(true); expect(setts.chain.bchDescartes).toBe(true); + expect(setts.chain.bchLobachevski).toBe(true); - expect(setts.chain.lobachevskiActivationTime).toBe(1715774400); expect(setts.chain.galoisActivationTime).toBe(1747310400); + expect(setts.chain.leibnizActivationTime).toBe(1778846400); expect(setts.chain.asertHalfLife).toBe(60 * 60); // one hour // ------------------------------------------------------------------------------------ diff --git a/test/node.test.js b/test/node.test.js index 3751790..3e4e9cb 100644 --- a/test/node.test.js +++ b/test/node.test.js @@ -122,8 +122,8 @@ describe('full indexed node tests', () => { it('node information', async () => { - expect(node_.capi_version).toEqual("0.41.0"); - expect(node_.cppapi_version).toEqual("0.38.0"); + expect(node_.capi_version).toEqual("0.47.0"); + expect(node_.cppapi_version).toEqual("0.44.0"); // expect(node_.version).toEqual("2.2.0"); expect(node_.microarchitecture).toEqual("ZLm9Pjh"); expect(node_.march_names).toEqual("64 bits, CMOV, CX8, FPU, FXSR, MMX, SCE, SSE, SSE2, CX16, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3, AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT ABM, MOVBE, XSAVE");