Commit Graph

26 Commits

Author SHA1 Message Date
Patrick Nagurny
c86f1a9c28 add getDifficulty method 2015-09-08 14:26:42 -04:00
Braydon Fuller
a50fccef4d Changes behavior of toJSON to work as expected with JSON.stringify
- see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior
- Updates CONTRIBUTING with changes to Stardard Methods
- Aliases toJSON for toObject
- Removes all `fromJSON` methods, and many cases replaces with `fromObject`
- Constructors expect an object parsed via `JSON.parse` for JSON input
2015-08-13 10:46:08 -04:00
Braydon Fuller
496edf9109 Check for consitency with block header argument hash and calculated hash. 2015-08-12 20:45:57 -04:00
Braydon Fuller
74dee1fda7 Include hash in toObject/toJSON results. 2015-08-11 11:42:23 -04:00
Braydon Fuller
8ff26bb260 Fixes for various formatting issues and typos. 2015-07-29 10:11:40 -04:00
Braydon Fuller
b5ada707bd Benchmarks for block serialization & 4x performance improvement. 2015-06-24 21:19:34 -04:00
Braydon Fuller
0dbd9db0ea Merge pull request #1233 from carnesen/typo
Typo "formated"
2015-05-13 18:59:31 -04:00
Chris Arnesen
ec2d726e49 typo "formated" 2015-05-13 15:48:23 -07:00
Kirill Fomichev
346b2af446 delete writable for accessor property 2015-05-10 23:55:55 +03:00
Manuel Araoz
dfc075e5d1 fix block parsing problem 2015-04-29 17:29:33 -03:00
Manuel Araoz
270413a655 add simpler test that fails 2015-04-29 15:54:41 -03:00
Manuel Araoz
722eddb894 add test that exposes bug 2015-04-29 15:31:46 -03:00
Manuel Araoz
100e370295 fix regressions after changes 2015-04-28 17:10:06 -03:00
Manuel Araoz
9a50958943 fix Block#toObject API 2015-04-28 16:42:56 -03:00
eordano
fcc9081ddd Fix JSDocs from String to string 2015-02-24 15:31:12 -03:00
Braydon Fuller
fb01bc09e4 Added test to check that merkle nodes do not match, and misc jshint fixes. 2015-02-24 11:38:06 -05:00
William Wolf
3eb95b6576 _traverseMerkleTree state cleanup + improve hasTransactions() 2015-02-24 00:51:38 -08:00
William Wolf
bb0efd2108 Remove _validMerkleTree caching 2015-02-23 19:40:52 -08:00
William Wolf
a478e39524 Review Fixes 2015-02-23 10:05:45 -08:00
William Wolf
a67084d176 cleanup 2015-02-23 01:06:22 -08:00
William Wolf
c558c4e34a hasTransaction(tx) + tests 2015-02-22 21:10:50 -08:00
William Wolf
611dae5b55 validMerkleTree() method plus more test blocks 2015-02-22 21:10:50 -08:00
William Wolf
a32d8dbab8 Add block/index.js 2015-02-22 21:10:50 -08:00
William Wolf
4b601c3711 Move block.js and blockheader.js into lib/block/ 2015-02-22 21:10:50 -08:00
William Wolf
32583fbbe3 Cleanup test 2015-02-22 21:10:49 -08:00
William Wolf
29c18e22f0 Add lib/block/merkleblock.js 2015-02-22 21:10:49 -08:00