diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 630e37a..0a10295 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: - name: Check out source uses: actions/checkout@v2 - name: Install Linters - run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0" + run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0" - name: Build env: GO111MODULE: "on" diff --git a/dcrtimed/dcrtimewallet/dcrtimewallet.go b/dcrtimed/dcrtimewallet/dcrtimewallet.go index 740bd59..a7b658e 100644 --- a/dcrtimed/dcrtimewallet/dcrtimewallet.go +++ b/dcrtimed/dcrtimewallet/dcrtimewallet.go @@ -115,6 +115,16 @@ func (d *DcrtimeWallet) Construct(merkleRoot [sha256.Size]byte) (*chainhash.Hash return nil, err } + // Request a change address while ignoring the gap policy. + nextAddressRequest := &pb.NextAddressRequest{ + Account: d.account, + GapPolicy: pb.NextAddressRequest_GAP_POLICY_IGNORE, + } + nextAddressResponse, err := d.wallet.NextAddress(d.ctx, nextAddressRequest) + if err != nil { + return nil, err + } + // Create transaction request. constructRequest := &pb.ConstructTransactionRequest{ SourceAccount: d.account, @@ -130,6 +140,9 @@ func (d *DcrtimeWallet) Construct(merkleRoot [sha256.Size]byte) (*chainhash.Hash Amount: 0, }, }, + ChangeDestination: &pb.ConstructTransactionRequest_OutputDestination{ + Address: nextAddressResponse.Address, + }, } constructResponse, err := d.wallet.ConstructTransaction(d.ctx, constructRequest)