Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chain/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ func (s *Syncer) mixMessage(ctx context.Context, params json.RawMessage) error {
msg.WriteHash(s.blake256Hasher)
s.blake256HasherMu.Unlock()

err = s.wallet.AcceptMixMessage(msg)
err = s.wallet.AcceptMixMessageBySource(msg, mixpool.ZeroSource)
var e *mixpool.MissingOwnPRError
if errors.As(err, &e) {
ke, ok := msg.(*wire.MsgMixKeyExchange)
Expand All @@ -957,7 +957,7 @@ func (s *Syncer) mixMessage(ctx context.Context, params json.RawMessage) error {
pr.WriteHash(s.blake256Hasher)
s.blake256HasherMu.Unlock()

err = s.wallet.AcceptMixMessage(pr)
err = s.wallet.AcceptMixMessageBySource(pr, mixpool.ZeroSource)
}
return err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/decred/dcrd/dcrutil/v4 v4.0.3
github.com/decred/dcrd/gcs/v4 v4.1.1
github.com/decred/dcrd/hdkeychain/v3 v3.1.3
github.com/decred/dcrd/mixing v0.7.2
github.com/decred/dcrd/mixing v0.7.3
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.4.0
github.com/decred/dcrd/rpcclient/v8 v8.1.0
github.com/decred/dcrd/txscript/v4 v4.1.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ github.com/decred/dcrd/gcs/v4 v4.1.1 h1:3ELoII8uwIxXFGq6ETB29AjW7Lmr3McQOYsSD3dv
github.com/decred/dcrd/gcs/v4 v4.1.1/go.mod h1:5q1EnYp1CzJw057/XfRB6UGkos24fpu2r2ZLuwE7YdE=
github.com/decred/dcrd/hdkeychain/v3 v3.1.3 h1:Kn2wfj5cOR6pQO/WrYOMT1KK12IgWFEeQwnk1o81WsU=
github.com/decred/dcrd/hdkeychain/v3 v3.1.3/go.mod h1:mDAuGaH6InRD+hKVeVJsjLD/ih1mD3aCKURNHS8Tq2s=
github.com/decred/dcrd/mixing v0.7.2 h1:lfCjkn9N7KuANNJkBdTJTrkIbzzklsf8yGBQ8trVTpk=
github.com/decred/dcrd/mixing v0.7.2/go.mod h1:riSgG1GpWXl8LVuBvo8WXuFgcBj01ZGpTAxT/4PrtU0=
github.com/decred/dcrd/mixing v0.7.3 h1:zrMPKvR3GP2stDiqT9tiv0e8GGnFpgl1EClNRew7FFk=
github.com/decred/dcrd/mixing v0.7.3/go.mod h1:riSgG1GpWXl8LVuBvo8WXuFgcBj01ZGpTAxT/4PrtU0=
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.4.0 h1:BBVaYemabsFsaqNVlCmacoZlSsLDqwHYIs8ty6fg59Q=
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.4.0/go.mod h1:w4C6hZ7ywpc8/YNkiPAknCaqKofF68cRhUiTglEIc7s=
github.com/decred/dcrd/rpcclient/v8 v8.1.0 h1:FLZ1j4ub7+O9oCIcKf+frYCrZW++G3FSzk2/f4U80hI=
Expand Down
2 changes: 1 addition & 1 deletion spv/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ func (s *Syncer) handleMixInvs(ctx context.Context, rp *p2p.RemotePeer, hashes [
}
}

err := s.wallet.AcceptMixMessage(msg)
err := s.wallet.AcceptMixMessageBySource(msg, rp)
var missingPRErr *mixpool.MissingOwnPRError
if errors.As(err, &missingPRErr) {
ke := msg.(*wire.MsgMixKeyExchange)
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const semverAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
const (
Major = 2
Minor = 1
Patch = 4
Patch = 5
)

// Integer is an integer encoding of the major.minor.patch version.
Expand Down
6 changes: 3 additions & 3 deletions wallet/addresses.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2025 The Decred developers
// Copyright (c) 2017-2026 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -843,7 +843,7 @@ func (w *Wallet) BIP0044BranchNextIndexes(ctx context.Context, account uint32) (
// BIP00044 account branch. The next returned address for the branch will be
// child+1.
func (w *Wallet) SyncLastReturnedAddress(ctx context.Context, account, branch, child uint32) error {
const op errors.Op = "wallet.ExtendWatchedAddresses"
const op errors.Op = "wallet.SyncLastReturnedAddress"

var (
branchXpub *hdkeychain.ExtendedKey
Expand All @@ -860,7 +860,7 @@ func (w *Wallet) SyncLastReturnedAddress(ctx context.Context, account, branch, c
var alb *addressBuffer
switch branch {
case udb.ExternalBranch:
alb = &acctData.albInternal
alb = &acctData.albExternal
case udb.InternalBranch:
alb = &acctData.albInternal
default:
Expand Down
13 changes: 13 additions & 0 deletions wallet/mixing.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ func PossibleCoinJoin(tx *wire.MsgTx) (isMix bool, mixDenom int64, mixCount uint

// AcceptMixMessage adds a mixing message received from the network backend to
// the wallet's mixpool.
//
// Deprecated: Use [AcceptMixMessageBySource].
func (w *Wallet) AcceptMixMessage(msg mixing.Message) error {
_, err := w.mixpool.AcceptMessage(msg, mixpool.ZeroSource)
if err != nil {
Expand All @@ -562,6 +564,17 @@ func (w *Wallet) AcceptMixMessage(msg mixing.Message) error {
return nil
}

// AcceptMixMessageBySource adds a mixing message received from the network
// backend to the wallet's mixpool.
func (w *Wallet) AcceptMixMessageBySource(msg mixing.Message, source mixpool.Source) error {
_, err := w.mixpool.AcceptMessage(msg, source)
if err != nil {
return err
}

return nil
}

func (w *Wallet) expireMixMessages(height uint32) {
mixc := w.mixClient.Load()
if mixc == nil {
Expand Down
Loading