(t *testing.T)
| 91 | } |
| 92 | |
| 93 | func TestBlockMultisig(t *testing.T) { |
| 94 | pub1, _, _ := ed25519.GenerateKey(nil) |
| 95 | pub2, _, _ := ed25519.GenerateKey(nil) |
| 96 | prog, _ := BlockMultiSigProgram([]ed25519.PublicKey{pub1, pub2}, 1) |
| 97 | pubs, n, err := ParseBlockMultiSigProgram(prog) |
| 98 | if err != nil { |
| 99 | t.Fatal(err) |
| 100 | } |
| 101 | if n != 1 { |
| 102 | t.Errorf("expected nrequired=1, got %d", n) |
| 103 | } |
| 104 | if !bytes.Equal(pubs[0], pub1) { |
| 105 | t.Errorf("expected first pubkey to be %x, got %x", pub1, pubs[0]) |
| 106 | } |
| 107 | if !bytes.Equal(pubs[1], pub2) { |
| 108 | t.Errorf("expected second pubkey to be %x, got %x", pub2, pubs[1]) |
| 109 | } |
| 110 | } |
nothing calls this directly
no test coverage detected