Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
fix(build): change magefile/protofile to stop using . as go_package (#27
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gagbo authored Mar 22, 2021
1 parent d5b6717 commit e515b97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const (
entryPoint = "cmd/lbs.go"
ldFlags = "-X $PACKAGE/version/version.commitHash=$COMMIT_HASH " +
"-X $PACKAGE/version/version.buildDate=$BUILD_DATE"
protoPlugins = "plugins=grpc"
protoDir = "pb/bitcoin"
protoFileName = "service.proto"
protoPlugins = "plugins=grpc"
protoDir = "pb"
protoFileName = "bitcoin/service.proto"
protoArtifactModule = "github.com/ledgerhq/bitcoin-lib-grpc/pb"
)

// Allow user to override executables on UNIX-like systems.
Expand Down Expand Up @@ -44,8 +45,10 @@ func init() {

func Proto() error {
return sh.Run(protoc,
fmt.Sprintf("--go_out=%s:%s", protoPlugins, protoDir), // protoc flags
fmt.Sprintf("%s/%s", protoDir, protoFileName)) // input .proto
fmt.Sprintf("--go_out=%s:%s", protoPlugins, protoDir), // protoc flags
fmt.Sprintf("%s/%s", protoDir, protoFileName), // input .proto
fmt.Sprintf("--go_opt=module=%s", protoArtifactModule), // module output
)
}

func Buf() error {
Expand Down
4 changes: 3 additions & 1 deletion pb/bitcoin/service.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package pb.bitcoin;
option go_package = ".;bitcoin";
option go_package = "github.com/ledgerhq/bitcoin-lib-grpc/pb/bitcoin";
option java_package = "co.ledger.protobuf.bitcoin.libgrpc";

// CoinService exposes a gRPC interface to wrap protocol-centric logic
Expand Down Expand Up @@ -237,8 +237,10 @@ message RawTransactionResponse {
// Same as hash if no witness is present.
string witness_hash = 3;

// Amount of change generated to the change address
int64 change_amount = 4;

// The total fees for the transaction
int64 total_fees = 5;

// If not enough utxos to pay for fees.
Expand Down

0 comments on commit e515b97

Please sign in to comment.