Skip to content

Commit

Permalink
lwk: set prime seconds
Browse files Browse the repository at this point in the history
This way, it prevents many automated clients from attacking
the server at the same time.
For example, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79,
83, 89 and 97 are good numbers.
  • Loading branch information
YusukeShimizu committed Jun 12, 2024
1 parent 692383e commit d742555
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lwk/electrumtxwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const (
// initialBlockHeaderSubscriptionTimeout is
// the initial block header subscription timeout.
initialBlockHeaderSubscriptionTimeout = 1000 * time.Second
blockHeaderSubscriptionTicker = 30 * time.Second
// Set prime seconds.
// This way, it prevents many automated clients from attacking the server at the same time.
// For example, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97 are good numbers.
blockHeaderSubscriptionTicker = 37 * time.Second
)

type electrumTxWatcher struct {
Expand Down

0 comments on commit d742555

Please sign in to comment.