MCPcopy Index your code
hub / github.com/bcoin-org/bcoin / randomInputScript

Function randomInputScript

scripts/fuzz.js:126–139  ·  view source on GitHub ↗
(redeem)

Source from the content-addressed store, hash-verified

124}
125
126function randomInputScript(redeem) {
127 const size = rand(1, 100);
128 const script = new Script();
129
130 for (let i = 0; i < size; i++) {
131 const len = rand(0, 100);
132 script.pushData(random.randomBytes(len));
133 }
134
135 if (redeem)
136 script.pushData(redeem);
137
138 return script.compile();
139}
140
141function randomOutputScript() {
142 const size = rand(1, 10000);

Callers 5

randomPubkeyContextFunction · 0.85
randomPubkeyhashContextFunction · 0.85
randomScripthashContextFunction · 0.85
fuzzSimpleFunction · 0.85
fuzzVerifyFunction · 0.85

Calls 3

pushDataMethod · 0.95
compileMethod · 0.95
randFunction · 0.85

Tested by

no test coverage detected