Dave Collins
ee46a0b108
Use bytes.NewReader for deserialize when possible.
...
Rather than using bytes.NewBuffer, which is a read/write entity
(io.ReadWriter), use bytes.NewReader which is only a read entitiy
(io.Reader) in all cases where it is possible. Benchmarking shows it's
slightly faster and it's also technically more accurate since it ensures
the data is read-only.
There are a few cases where bytes.NewBuffer must still be used since a
buffer with a known length is required for those instances.
2014-06-04 23:39:03 -05:00
Dave Collins
dfdd223223
Move genesis blocks to btcnet package.
...
The genesis blocks are not really part of the wire protocol rather they
are part of a network parameters. Thus, this commit moves the all of the
gensis blocks and tests to the btcnet package.
Also, create variables in the test package for the mainnet genesis hash,
merkle root, and coinbase transaction for use throughout the tests since
they the exported values are no longer available.
2014-05-28 09:14:38 -05:00
Dave Collins
2de1b73d12
Add a benchmark for TxSha.
...
This commit adds a benchmark for the TxSha function of a MsgTx.
2014-03-20 10:46:36 -05:00
Dave Collins
6c7f45fdb7
Add 2014 to copyright dates.
2014-01-08 23:44:08 -06:00
Dave Collins
7de20add63
Add benchmark for writeBlockHeader.
...
This commit adds a benchmark for the writeBlockHeader function.
2013-11-07 00:30:20 -06:00
Dave Collins
d21050a8aa
Add benchmark for readBlockHeader.
...
This commit adds a benchmark for the readBlockHeader function.
2013-11-06 20:35:17 -06:00
Dave Collins
92b2f9e6b3
Add benchmarks for transaction Deserialize.
...
This commit adds a benchmark for the MsgTx.BtcDecode/Deserialize
functions.
2013-11-06 18:01:29 -06:00
Dave Collins
fe713b8013
Add benchmarks for transaction Serialize.
...
This commit adds a benchmark for the MsgTx.BtcEncode/Serialize functions.
2013-11-06 16:56:42 -06:00
Dave Collins
63cc0851e5
Add benchmarks for writeTxIn.
...
This commit adds a benchmark for the writeTxIn function.
2013-11-06 16:21:49 -06:00
Dave Collins
1fe9f9e165
Add benchmarks for readTxIn.
...
This commit adds a benchmark for the readTxIn function.
2013-11-06 16:06:53 -06:00
Dave Collins
0228508172
Add benchmarks for readTxOut.
...
This commit adds a benchmark for the readTxOut function.
2013-11-06 15:40:46 -06:00
Dave Collins
ab8c8e2d39
Add benchmarks for writeTxOut.
...
This commit adds a benchmark for the writeTxOut function.
2013-11-06 15:21:37 -06:00
Dave Collins
d63e0dd455
Add benchmarks for readOutPoint.
...
This commit adds a benchmark for the readOutPoint function.
2013-11-06 07:33:37 -06:00
Dave Collins
547b648702
Add benchmarks for writeOutPoint.
...
This commit adds a benchmark for the writeOutPoint function.
2013-11-06 00:45:30 -06:00
Dave Collins
fa8f666e8c
Add benchmarks for writeVarString.
...
This commit adds a couple of benchmarks for the writeVarString function.
2013-11-05 23:49:34 -06:00
Dave Collins
b830e2ddf3
Add benchmarks for readVarString.
...
This commit adds a few benchmarks for the readVarString function.
2013-11-05 23:09:44 -06:00
Dave Collins
052c2ca8d3
Correct benchmark comments.
2013-11-05 23:03:54 -06:00
Dave Collins
87ce23d679
Add benchmarks for readVarInt.
...
This commit adds a few benchmarks for the readVarInt function.
2013-11-05 21:35:28 -06:00
Dave Collins
900db0b444
Add benchmarks for writeVarInt.
...
This commit adds a few benchmarks for the writeVarInt function.
2013-11-05 19:56:12 -06:00