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

Function BenchmarkTxInputWriteToFalse

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

Source from the content-addressed store, hash-verified

365}
366
367func BenchmarkTxInputWriteToFalse(b *testing.B) {
368 input := NewSpendInput(nil, bc.Hash{}, bc.AssetID{}, 0, 0, nil, bc.Hash{}, nil)
369 ew := errors.NewWriter(ioutil.Discard)
370 for i := 0; i < b.N; i++ {
371 input.writeTo(ew, serRequired)
372 }
373}
374
375func BenchmarkTxOutputWriteToTrue(b *testing.B) {
376 output := NewTxOutput(bc.AssetID{}, 0, nil, nil)

Callers

nothing calls this directly

Calls 2

NewSpendInputFunction · 0.85
writeToMethod · 0.45

Tested by

no test coverage detected