Skip to content

Commit 7a79aa8

Browse files
committed
Update to latest mixing module
This update includes debug logging added to mixpool's AcceptMessage method, so some additional and now duplicate logging can be removed. This also has the side effect of logging the same messages in SPV mode, and with matching messages to dcrd also running with mixpool debug logging.
1 parent 0b296aa commit 7a79aa8

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

chain/sync.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"time"
1919

2020
"decred.org/dcrwallet/v4/errors"
21-
"decred.org/dcrwallet/v4/internal/loggers"
2221
"decred.org/dcrwallet/v4/rpc/client/dcrd"
2322
"decred.org/dcrwallet/v4/validate"
2423
"decred.org/dcrwallet/v4/wallet"
@@ -926,16 +925,8 @@ func (s *Syncer) mixMessage(ctx context.Context, params json.RawMessage) error {
926925
s.blake256HasherMu.Lock()
927926
msg.WriteHash(s.blake256Hasher)
928927
s.blake256HasherMu.Unlock()
929-
msgHash := msg.Hash()
930-
err = s.wallet.AcceptMixMessage(msg)
931-
if err == nil {
932-
loggers.MixpLog.Debugf("Accepted mix message %T %s by %x",
933-
msg, &msgHash, msg.Pub())
934-
} else {
935-
loggers.MixpLog.Debugf("Rejected mix message %T %s by %x",
936-
msg, &msgHash, msg.Pub())
937-
}
938928

929+
err = s.wallet.AcceptMixMessage(msg)
939930
var e *mixpool.MissingOwnPRError
940931
if errors.As(err, &e) {
941932
ke, ok := msg.(*wire.MsgMixKeyExchange)
@@ -947,13 +938,8 @@ func (s *Syncer) mixMessage(ctx context.Context, params json.RawMessage) error {
947938
s.blake256HasherMu.Lock()
948939
pr.WriteHash(s.blake256Hasher)
949940
s.blake256HasherMu.Unlock()
950-
prHash := pr.Hash()
951941

952942
err = s.wallet.AcceptMixMessage(pr)
953-
if err == nil {
954-
loggers.MixpLog.Debugf("Accepted missing PR %s for "+
955-
"previous orphan KE %s", &prHash, &msgHash)
956-
}
957943
}
958944
return err
959945
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/decred/dcrd/dcrutil/v4 v4.0.2
2121
github.com/decred/dcrd/gcs/v4 v4.1.0
2222
github.com/decred/dcrd/hdkeychain/v3 v3.1.2
23-
github.com/decred/dcrd/mixing v0.2.1-0.20240529162252-394b25699e29
23+
github.com/decred/dcrd/mixing v0.2.1-0.20240530202656-ec03b5bab879
2424
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0
2525
github.com/decred/dcrd/rpcclient/v8 v8.0.1
2626
github.com/decred/dcrd/txscript/v4 v4.1.1

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ github.com/decred/dcrd/gcs/v4 v4.1.0 h1:tpW7JW53yJZlgNwl/n2NL1b8NxHaIPRUyNuLMkB/
5959
github.com/decred/dcrd/gcs/v4 v4.1.0/go.mod h1:nPTbGM/I3Ihe5KFvUmxZEqQP/jDZQjQ63+WEi/f4lqU=
6060
github.com/decred/dcrd/hdkeychain/v3 v3.1.2 h1:x25WuuE7zM/20EynuVMyOhL0K8BwGBBsexGq8xTiHFA=
6161
github.com/decred/dcrd/hdkeychain/v3 v3.1.2/go.mod h1:FnNJmZ7jqUDeAo6/c/xkQi5cuxh3EWtJeMmW6/Z8lcc=
62-
github.com/decred/dcrd/mixing v0.2.1-0.20240528211104-8948c217c027 h1:6Npwi0qe5zrEDnasIceh+yYtlA3cIkl/5COykWJgoko=
63-
github.com/decred/dcrd/mixing v0.2.1-0.20240528211104-8948c217c027/go.mod h1:W3K7yJKmoI03G2U5Yw+HSRNe6lLBegi63ZR6fFLnM9c=
64-
github.com/decred/dcrd/mixing v0.2.1-0.20240529162252-394b25699e29 h1:DuR1/EakeiLh3B0bSH/z5+PseWAVIAjIVTtegiJRKN0=
65-
github.com/decred/dcrd/mixing v0.2.1-0.20240529162252-394b25699e29/go.mod h1:W3K7yJKmoI03G2U5Yw+HSRNe6lLBegi63ZR6fFLnM9c=
62+
github.com/decred/dcrd/mixing v0.2.1-0.20240530202656-ec03b5bab879 h1:j4xJ120CN/7WVhT4v+VfoniJDaCXu4MvrLX+hKMwqBw=
63+
github.com/decred/dcrd/mixing v0.2.1-0.20240530202656-ec03b5bab879/go.mod h1:W3K7yJKmoI03G2U5Yw+HSRNe6lLBegi63ZR6fFLnM9c=
6664
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0 h1:l0DnCcILTNrpy8APF3FLN312ChpkQaAuW30aC/RgBaw=
6765
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0/go.mod h1:j+kkRPXPJB5S9VFOsx8SQLcU7PTFkPKRc1aCHN4ENzA=
6866
github.com/decred/dcrd/rpcclient/v8 v8.0.1 h1:hd81e4w1KSqvPcozJlnz6XJfWKDNuahgooH/N5E8vOU=

0 commit comments

Comments
 (0)