Branch: refs/heads/master
Home: https://github.com/conformal/btcwire
Commit: ee46a0b108acc5eb099ad88fcecddd87c6867700
https://github.com/conformal/btcwire/commit/ee46a0b108acc5eb099ad88fcecddd87c6867700
Author: Dave Collins <[email protected]>
Date: 2014-06-04 (Wed, 04 Jun 2014)
Changed paths:
M bench_test.go
M blockheader_test.go
M common_test.go
M invvect_test.go
M message.go
M message_test.go
M msgaddr_test.go
M msgalert_test.go
M msgblock_test.go
M msgfilterclear_test.go
M msgfilterload_test.go
M msggetaddr_test.go
M msggetblocks_test.go
M msggetdata_test.go
M msggetheaders_test.go
M msgheaders_test.go
M msginv_test.go
M msgmerkleblock_test.go
M msgnotfound_test.go
M msgping_test.go
M msgpong_test.go
M msgreject_test.go
M msgtx_test.go
M msgverack_test.go
M netaddress_test.go
Log Message:
-----------
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.