Skip to content
Draft
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: 3 additions & 1 deletion mixing/mixclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const MinPeers = mixing.MinPeers

const pairingVersion byte = 3

const (
// durations below should be treated as constants, they are only variables so
// they can be overridden in tests.
var (
timeoutDuration = 30 * time.Second
maxJitter = timeoutDuration / 10
msgJitter = 300 * time.Millisecond
Expand Down
7 changes: 7 additions & 0 deletions mixing/mixclient/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ func (w *testWallet) privForPkScript(p2pkhScript []byte) *secp256k1.PrivateKey {
return w.privForHash160(hash160)
}

func TestMain(t *testing.T) {
timeoutDuration = 1 * time.Second
maxJitter = timeoutDuration / 10
msgJitter = 10 * time.Millisecond
peerJitter = maxJitter - msgJitter
}

func TestHonest(t *testing.T) {
requireCsppsolver(t)

Expand Down