This commit is contained in:
Dave Collins 2014-02-21 02:09:55 -06:00
parent 88f3c73ad1
commit 982f282e10
2 changed files with 14 additions and 14 deletions

View file

@ -1064,7 +1064,7 @@ func MultiSigScript(pubkeys []*btcutil.AddressPubKey, nrequired int) ([]byte, er
}
builder := NewScriptBuilder().AddInt64(int64(nrequired))
for _, key := range pubkeys {
for _, key := range pubkeys {
builder.AddData(key.ScriptAddress())
}
builder.AddInt64(int64(len(pubkeys)))

View file

@ -2887,9 +2887,9 @@ func TestPayToAddrScript(t *testing.T) {
// mainnet p2pk 13CG6SJ3yHUXo4Cr2RY4THLLJrNFuG3gUg
p2pkCompressedMain, err := btcutil.NewAddressPubKey([]byte{
0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94 , 0x34, 0x4c, 0x95,
0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d , 0x8d, 0x79, 0x03,
0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24 , 0x89, 0x5d, 0xca,
0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95,
0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03,
0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca,
0x52, 0xc6, 0xb4}, btcwire.MainNet)
if err != nil {
t.Errorf("Unable to create pubkey address (compressed): %v",
@ -3020,9 +3020,9 @@ func TestPayToAddrScript(t *testing.T) {
func TestMultiSigScript(t *testing.T) {
// mainnet p2pk 13CG6SJ3yHUXo4Cr2RY4THLLJrNFuG3gUg
p2pkCompressedMain, err := btcutil.NewAddressPubKey([]byte{
0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94 , 0x34, 0x4c, 0x95,
0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d , 0x8d, 0x79, 0x03,
0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24 , 0x89, 0x5d, 0xca,
0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95,
0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03,
0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca,
0x52, 0xc6, 0xb4}, btcwire.MainNet)
if err != nil {
t.Errorf("Unable to create pubkey address (compressed): %v",
@ -3055,10 +3055,10 @@ func TestMultiSigScript(t *testing.T) {
}
tests := []struct {
keys []*btcutil.AddressPubKey
nrequired int
expected []byte
err error
keys []*btcutil.AddressPubKey
nrequired int
expected []byte
err error
}{
{
[]*btcutil.AddressPubKey{