MCPcopy Create free account
hub / github.com/chain/txvm / WithOutputIDs

Function WithOutputIDs

protocol/prottest/block.go:35–41  ·  view source on GitHub ↗

WithOutputIDs is an option for NewChain that prepopulates the blockchain's utxo set with the given hashes.

(outputIDs ...bc.Hash)

Source from the content-addressed store, hash-verified

33// WithOutputIDs is an option for NewChain that prepopulates the
34// blockchain's utxo set with the given hashes.
35func WithOutputIDs(outputIDs ...bc.Hash) Option {
36 return func(_ testing.TB, conf *config) {
37 for _, oid := range outputIDs {
38 conf.initialState.ContractsTree.Insert(oid.Bytes())
39 }
40 }
41}
42
43// WithBlockSigners is an option for NewChain that configures the
44// NextPredicate for blocks in the new chain. It generates a suitable

Callers

nothing calls this directly

Calls 2

InsertMethod · 0.80
BytesMethod · 0.45

Tested by

no test coverage detected