diff --git a/example/golang/dummy_test.go b/example/golang/dummy_test.go index 8e93d7d3c..38b9b3d39 100644 --- a/example/golang/dummy_test.go +++ b/example/golang/dummy_test.go @@ -72,7 +72,7 @@ func TestStream(t *testing.T) { var n int var err error var req types.Request = types.RequestAppendTx{TxBytes: []byte("test")} - wire.WriteBinaryLengthPrefixed(req, conn, &n, &err) + wire.WriteBinaryLengthPrefixed(struct{ types.Request }{req}, conn, &n, &err) if err != nil { t.Fatal(err.Error()) } @@ -80,7 +80,7 @@ func TestStream(t *testing.T) { // Sometimes send flush messages if counter%123 == 0 { t.Log("flush") - wire.WriteBinaryLengthPrefixed(types.RequestFlush{}, conn, &n, &err) + wire.WriteBinaryLengthPrefixed(struct{ types.Request }{types.RequestFlush{}}, conn, &n, &err) if err != nil { t.Fatal(err.Error()) } @@ -89,7 +89,7 @@ func TestStream(t *testing.T) { // Send final flush message var n int - wire.WriteBinaryLengthPrefixed(types.RequestFlush{}, conn, &n, &err) + wire.WriteBinaryLengthPrefixed(struct{ types.Request }{types.RequestFlush{}}, conn, &n, &err) if err != nil { t.Fatal(err.Error()) } diff --git a/server/server.go b/server/server.go index a9caae953..e109c9ac7 100644 --- a/server/server.go +++ b/server/server.go @@ -146,7 +146,7 @@ func handleResponses(closeConn chan error, responses <-chan types.Response, conn var res = <-responses var n int var err error - wire.WriteBinaryLengthPrefixed(res, bufWriter, &n, &err) + wire.WriteBinaryLengthPrefixed(struct{ types.Response }{res}, bufWriter, &n, &err) if err != nil { closeConn <- fmt.Errorf("Error in handleResponses: %v", err.Error()) return