From 982f282e10ad7116448280c6d5c45084949d22a3 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 21 Feb 2014 02:09:55 -0600 Subject: [PATCH] Go fmt. --- script.go | 8 ++++---- script_test.go | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/script.go b/script.go index 469a7962..da897bb9 100644 --- a/script.go +++ b/script.go @@ -1014,14 +1014,14 @@ func payToPubKeyHashScript(pubKeyHash []byte) []byte { // script hash. It is expected that the input is a valid hash. func payToScriptHashScript(scriptHash []byte) []byte { return NewScriptBuilder().AddOp(OP_HASH160).AddData(scriptHash). - AddOp(OP_EQUAL).Script() + AddOp(OP_EQUAL).Script() } // payToPubkeyScript creates a new script to pay a transaction output to a // public key. It is expected that the input is a valid pubkey. func payToPubKeyScript(serializedPubKey []byte) []byte { return NewScriptBuilder().AddData(serializedPubKey). - AddOp(OP_CHECKSIG).Script() + AddOp(OP_CHECKSIG).Script() } // PayToAddrScript creates a new script to pay a transaction output to a the @@ -1052,7 +1052,7 @@ func PayToAddrScript(addr btcutil.Address) ([]byte, error) { // ErrBadNumRequired is returned from MultiSigScript when nrequired is larger // than the number of provided public keys. -var ErrBadNumRequired = errors.New("more signatures required than keys present") +var ErrBadNumRequired = errors.New("more signatures required than keys present") // MultiSigScript returns a valid script for a multisignature redemption where // nrequired of the keys in pubkeys are required to have signed the transaction @@ -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))) diff --git a/script_test.go b/script_test.go index 0b59070c..337a2f04 100644 --- a/script_test.go +++ b/script_test.go @@ -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{