From eb5026b9c60c692b6866090a879339f3badc30f1 Mon Sep 17 00:00:00 2001 From: Dave <5268997+davehlong@users.noreply.github.com> Date: Wed, 21 Aug 2019 07:02:22 +0200 Subject: [PATCH] remove blockTemplate from tests --- tests/blockTests.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/blockTests.js b/tests/blockTests.js index 61140970..0eb67f19 100644 --- a/tests/blockTests.js +++ b/tests/blockTests.js @@ -7,7 +7,6 @@ const assert = require('assert') const BlockTemplateSample = require('./template.json') const Block = require('../').Block -const BlockTemplate = require('../').BlockTemplate console.log('') console.log('Block Template Tests...') @@ -35,27 +34,6 @@ console.log('Genesis Block: %s', genesisBlock.blob) assert(genesisBlockRaw === genesisBlock.blob) -console.log('') -console.log('') -console.log('BlockTemplate Handling Tests') -const miningBlob = '0100b5f9abe605b4318c1249164393f7b9d691e60aba81ca9bbffb9e0b23e6b01c93d9c621ab80000000004b27c162bc89b0bdfa0db8b5c99977943caf754bb6181d8e1bafc6af2ab0b0bb01' -const testBlockTemplate = new BlockTemplate(BlockTemplateSample) -const convertedTemplate = testBlockTemplate.convert() -console.log('') -console.log('Converted BlockTemplate: %s', convertedTemplate.hashingBlob) -console.log('Expected BlockTemplate: %s', miningBlob) - -assert(convertedTemplate.hashingBlob === miningBlob) - -const expectedMergedBlob = '0500b4318c1249164393f7b9d691e60aba81ca9bbffb9e0b23e6b01c93d9c621ab800100b5f9abe605b4318c1249164393f7b9d691e60aba81ca9bbffb9e0b23e6b01c93d9c621ab80641c00000101000000230321008a7f7239a53ead2db2fc1062a898c1af301e919e2f26e13a568176ba7f1a0e1f01b9fe5801ff91fe58070802959f9d01c4cbd664e7c937687e7ae847f75745614ba4a11a6f5c0b25a5ca42c314026840ba5dc6c84a533d005f0a6f9758c4eb4d19bffa3b4a73547596dac17b7d169003022f88b7b85f42c789721e7ee44bded4b6e1e48f7fb9bb73dc87cda264adf06a54f02e02175cea7cf09b914749c650b9321678d3f0e4390cad20ac6896be7ac14ba4f31ab0ea01021192fdc86fd815642850c0f50bc11df8ba1d39581d2c0642aa83f72f1c3fb22580ea3002c28a03fb9b3b7f6e4f9cdf2e74e93c8282580d8134722302b9978cdc3a35f39980897a02a4978ee1742da6f77791f065326922ff8c713687d2b52215ce7911b08922a7602901296929051bf0b258b717ffdca80c8b0822063c9d3f70f0dbed9b3f2e0aca2fa1020600000000000012f6b48f1800c368e046252e50165620fbb155176d17ddfdb98fd3227237760cf579af90593ec64a4a5549bd219969dc9aa1aac2dc3eab529c90b2f8c20221f99f02bdfb9a7efb5e5e85b710ef442b3cc82431173db142947a4f755a22f45915e5f2d53027a4aee505305c7cde822f960578417779ef71c1c8b611e95f1643fd125a39df66f40ce82794c9debc342381f26763c80968f8bf8e5378b433c583a6078348457ebe6ad61e5487ac3bebe22e03c46d9c894a511561ffbe9612809c17207493941d607b152f4ce193f828085ee8afcc0a351a9cecac0f01b2729df67af831637f76a8430848d86beb643df918af6cc554a8d0b42899671ee02cfbe64905b4458647a90a50aa307be48f3db57ff7f5446926ee70cee0c0cf7ad9021de727b2f97b5e2f0fd0103b24725d0c11ddd876de27a7b837bdd43eb4d9ca479883ad2dcd853ece92e6a7544b24e44051411e6b913760b9d997ca986985b92d51ccbc5708f0cd93c0ce2d1aea46a6744cc81a3df394cd099518cb3c3a5fa43e187c9d72bc3a245256fa60b450411b56d2258d4001b6133f58a5d48af0cc12af652c202b3c9de3f426026500c493c075340ca713a49843db16bda542fd76fb597914e1c975a70d12971baf70b8f7f6f452fd669f3cc00d0a0f36a3312f7c51cadf24cac9c24841eeaa742b5d1e74a750e5763afbd2a75e341edb4439801ac665dd0a3b16cc648a651546c7a3633f0a0274bb3815d6bda05e12fb7cbb908ceb582590a84a30ba6043178279343f5107713390b8e2ca2a8723ee7e5855c6af674bbd9b5a' -const mergedBlobResult = testBlockTemplate.construct(0x641c0000) -console.log('') -console.log('Merged Blob: %s', mergedBlobResult.blob) -console.log('') -console.log('Expected Blob: %s', expectedMergedBlob) - -assert(mergedBlobResult.blob === expectedMergedBlob) - const blocks = [ { block: '010000000000000000000000000000000000000000000000000000000000000000000046000000010a01ff000188f3b501029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071210142694232c5b04151d9e4c27d31ec7a68ea568b19488cfcb422659a07a0e44dd500', hash: '7fb97df81221dd1366051b2d0bc7f49c66c22ac4431d879c895b06d66ef66f4c', pow: 'c47674de70b0f4b4dafcd5b3e423ee301de6c16093e57e93c7997c28c18a1b92' }, { block: '0100b483aed1057fb97df81221dd1366051b2d0bc7f49c66c22ac4431d879c895b06d66ef66f4c5f59fbb6012901ff01060202c88b97a816870f3179e4f963d2c3876ab28cbd685776e67af79294f4072bedb31e02db599739f69f2590687a5247508745254c04aa4e367866a91bc79bea9c456857c801021f46687138e0b9d29be92fe8d6ee8ea46c4dc9e57b050554039e7b3fc38712c580f10402fbd7a33c704ede0403a134fbcdf23bd3c74ffee8929aa0e6c81f08e2bad4718ca0f736028490517006f93c79bf19edaa2edde725bc3b1cb2b2e5422287c8c20ad1550e2880897a0243a264e0e9ef291c8bf6310e98adfd52a42eeaea791d2f4eb2304a181a3270d72101bcdd0d175a90ce8514f6832833461afec5c5e4d373400a5783b8b66ae38d59e000', hash: '8c9738f961a278486f27ce214d1e4d67e08f7400c8b38fe00cdd571a8d302c7d', pow: '5dc80c7f5b2266396999f746105ec6550b25f3d87b1eb52c0c05c5777d2e8392' },