MCPcopy Create free account
hub / github.com/copernet/copernicus / parseScriptFlag

Function parseScriptFlag

logic/lscript/lscript_test.go:378–392  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

376}
377
378func parseScriptFlag(s string) (uint32, error) {
379 var res uint32
380 words := strings.Split(s, ",")
381 for _, w := range words {
382 if w == "" {
383 continue
384 }
385 if flag, ok := scriptFlagMap[w]; ok {
386 res |= flag
387 } else {
388 return 0, fmt.Errorf("not found script flag for name %s", w)
389 }
390 }
391 return res, nil
392}
393
394func signMultisig(scriptPubKey *script.Script, keys []crypto.PrivateKey, transaction *tx.Tx) *script.Script {
395 hash, _ := tx.SignatureHash(transaction, scriptPubKey,

Callers 1

doScriptJSONTestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected