MCPcopy Create free account
hub / github.com/chain/Core / BenchmarkTxInputWriteToTrue

Function BenchmarkTxInputWriteToTrue

protocol/bc/legacy/transaction_test.go:359–365  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

357}
358
359func BenchmarkTxInputWriteToTrue(b *testing.B) {
360 input := NewSpendInput(nil, bc.Hash{}, bc.AssetID{}, 0, 0, nil, bc.Hash{}, nil)
361 ew := errors.NewWriter(ioutil.Discard)
362 for i := 0; i < b.N; i++ {
363 input.writeTo(ew, 0)
364 }
365}
366
367func BenchmarkTxInputWriteToFalse(b *testing.B) {
368 input := NewSpendInput(nil, bc.Hash{}, bc.AssetID{}, 0, 0, nil, bc.Hash{}, nil)

Callers

nothing calls this directly

Calls 2

NewSpendInputFunction · 0.85
writeToMethod · 0.45

Tested by

no test coverage detected