goimports -w .
This commit is contained in:
parent
5032b07c66
commit
3a1009529f
31 changed files with 85 additions and 54 deletions
|
@ -6,9 +6,10 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// genesisCoinbaseTx is the coinbase transaction for the genesis blocks for
|
// genesisCoinbaseTx is the coinbase transaction for the genesis blocks for
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestBlockHeader tests the BlockHeader API.
|
// TestBlockHeader tests the BlockHeader API.
|
||||||
|
|
|
@ -8,9 +8,10 @@ import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/conformal/fastsha256"
|
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
|
"github.com/conformal/fastsha256"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Maximum payload size for a variable length integer.
|
// Maximum payload size for a variable length integer.
|
||||||
|
|
|
@ -7,12 +7,13 @@ package btcwire_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mainNetGenesisHash is the hash of the first block in the block chain for the
|
// mainNetGenesisHash is the hash of the first block in the block chain for the
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
package btcwire_test
|
package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fakeMessage implements the btcwire.Message interface and is used to force
|
// fakeMessage implements the btcwire.Message interface and is used to force
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestInvVectStringer tests the stringized output for inventory vector types.
|
// TestInvVectStringer tests the stringized output for inventory vector types.
|
||||||
|
|
|
@ -7,13 +7,14 @@ package btcwire_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// makeHeader is a convenience function to make a message header in the form of
|
// makeHeader is a convenience function to make a message header in the form of
|
||||||
|
|
|
@ -6,13 +6,14 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestAddr tests the MsgAddr API.
|
// TestAddr tests the MsgAddr API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestMsgAlert tests the MsgAlert API.
|
// TestMsgAlert tests the MsgAlert API.
|
||||||
|
|
|
@ -6,12 +6,13 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestBlock tests the MsgBlock API.
|
// TestBlock tests the MsgBlock API.
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestFilterAddLatest tests the MsgFilterAdd API against the latest protocol
|
// TestFilterAddLatest tests the MsgFilterAdd API against the latest protocol
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestFilterCLearLatest tests the MsgFilterClear API against the latest
|
// TestFilterCLearLatest tests the MsgFilterClear API against the latest
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestFilterCLearLatest tests the MsgFilterLoad API against the latest protocol
|
// TestFilterCLearLatest tests the MsgFilterLoad API against the latest protocol
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGetAddr tests the MsgGetAddr API.
|
// TestGetAddr tests the MsgGetAddr API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGetBlocks tests the MsgGetBlocks API.
|
// TestGetBlocks tests the MsgGetBlocks API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGetData tests the MsgGetData API.
|
// TestGetData tests the MsgGetData API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestGetHeaders tests the MsgGetHeader API.
|
// TestGetHeaders tests the MsgGetHeader API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestHeaders tests the MsgHeaders API.
|
// TestHeaders tests the MsgHeaders API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestInv tests the MsgInv API.
|
// TestInv tests the MsgInv API.
|
||||||
|
|
|
@ -6,8 +6,9 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMemPool(t *testing.T) {
|
func TestMemPool(t *testing.T) {
|
||||||
|
|
|
@ -7,12 +7,13 @@ package btcwire_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestMerkleBlock tests the MsgMerkleBlock API.
|
// TestMerkleBlock tests the MsgMerkleBlock API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestNotFound tests the MsgNotFound API.
|
// TestNotFound tests the MsgNotFound API.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestPing tests the MsgPing API against the latest protocol version.
|
// TestPing tests the MsgPing API against the latest protocol version.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestPongLatest tests the MsgPong API against the latest protocol version.
|
// TestPongLatest tests the MsgPong API against the latest protocol version.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestRejectCodeStringer tests the stringized output for the reject code type.
|
// TestRejectCodeStringer tests the stringized output for the reject code type.
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestTx tests the MsgTx API.
|
// TestTx tests the MsgTx API.
|
||||||
|
|
|
@ -6,10 +6,11 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestVerAck tests the MsgVerAck API.
|
// TestVerAck tests the MsgVerAck API.
|
||||||
|
|
|
@ -6,14 +6,15 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestVersion tests the MsgVersion API.
|
// TestVersion tests the MsgVersion API.
|
||||||
|
|
|
@ -6,13 +6,14 @@ package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestNetAddress tests the NetAddress API.
|
// TestNetAddress tests the NetAddress API.
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
package btcwire_test
|
package btcwire_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestServiceFlagStringer tests the stringized output for service flag types.
|
// TestServiceFlagStringer tests the stringized output for service flag types.
|
||||||
|
|
|
@ -7,8 +7,9 @@ package btcwire_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestShaHash tests the ShaHash API.
|
// TestShaHash tests the ShaHash API.
|
||||||
|
|
Loading…
Reference in a new issue