Branch: refs/heads/master
Home: https://github.com/btcsuite/btcd
Commit: 279308288cf533a3c7c5c0dba643d83677d96fbd
https://github.com/btcsuite/btcd/commit/279308288cf533a3c7c5c0dba643d83677d96fbd
Author: Dave Collins <[email protected]>
Date: 2015-03-10 (Tue, 10 Mar 2015)
Changed paths:
A blockchain/bench_test.go
M blockchain/validate.go
Log Message:
-----------
blockchain: Provide new IsCoinBaseTx function.
This commit adds a new function to the blockchain package named
IsCoinBaseTx which performs the same function as IsCoinBase except it
takes raw wire transactions as opposed to the higher level util
transactions.
While here, it also adds a file for benchmarks along with a couple of
benchmarks for the IsCoinBase and IsCoinBaseTx functions.
Finally, the function was very slightly optimized:
BenchmarkIsCoinBaseOld 100000000 10.7 ns/op 0 B/op 0 allocs/op
BenchmarkIsCoinBaseNew 200000000 6.05 ns/op 0 B/op 0 allocs/op