From dddd6ef006a6e475073b32a33cf40c311bfdcb35 Mon Sep 17 00:00:00 2001 From: benma Date: Sat, 26 Jan 2019 14:30:47 +0100 Subject: [PATCH] accounts/usbwallet/trezor: expose protobuf package (#17980) When some of the same messages are redefined anywhere in a Go project, the protobuf package panics (see https://github.com/golang/protobuf/issues/178). Since this package is internal, there is no way to work around it, as one cannot use it directly, but also cannot define the same messages. There is no downside in making the package accessible. --- accounts/usbwallet/trezor.go | 2 +- accounts/usbwallet/{internal => }/trezor/messages.pb.go | 0 accounts/usbwallet/{internal => }/trezor/messages.proto | 0 accounts/usbwallet/{internal => }/trezor/trezor.go | 0 accounts/usbwallet/{internal => }/trezor/types.pb.go | 0 accounts/usbwallet/{internal => }/trezor/types.proto | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename accounts/usbwallet/{internal => }/trezor/messages.pb.go (100%) rename accounts/usbwallet/{internal => }/trezor/messages.proto (100%) rename accounts/usbwallet/{internal => }/trezor/trezor.go (100%) rename accounts/usbwallet/{internal => }/trezor/types.pb.go (100%) rename accounts/usbwallet/{internal => }/trezor/types.proto (100%) diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go index 82525a20c..d3e17aba1 100644 --- a/accounts/usbwallet/trezor.go +++ b/accounts/usbwallet/trezor.go @@ -28,7 +28,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/accounts/usbwallet/internal/trezor" + "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" diff --git a/accounts/usbwallet/internal/trezor/messages.pb.go b/accounts/usbwallet/trezor/messages.pb.go similarity index 100% rename from accounts/usbwallet/internal/trezor/messages.pb.go rename to accounts/usbwallet/trezor/messages.pb.go diff --git a/accounts/usbwallet/internal/trezor/messages.proto b/accounts/usbwallet/trezor/messages.proto similarity index 100% rename from accounts/usbwallet/internal/trezor/messages.proto rename to accounts/usbwallet/trezor/messages.proto diff --git a/accounts/usbwallet/internal/trezor/trezor.go b/accounts/usbwallet/trezor/trezor.go similarity index 100% rename from accounts/usbwallet/internal/trezor/trezor.go rename to accounts/usbwallet/trezor/trezor.go diff --git a/accounts/usbwallet/internal/trezor/types.pb.go b/accounts/usbwallet/trezor/types.pb.go similarity index 100% rename from accounts/usbwallet/internal/trezor/types.pb.go rename to accounts/usbwallet/trezor/types.pb.go diff --git a/accounts/usbwallet/internal/trezor/types.proto b/accounts/usbwallet/trezor/types.proto similarity index 100% rename from accounts/usbwallet/internal/trezor/types.proto rename to accounts/usbwallet/trezor/types.proto